]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/bash | |
2 | #---------------------------------------------------------------------- | |
3 | ||
4 | set -o errexit | |
5 | ||
6 | # read the config variables from the file given on the command line | |
7 | . $1 | |
8 | ||
9 | ||
10 | ||
11 | ||
12 | chmod a+r $STAGING_DIR/* | |
13 | ||
14 | if [ $KIND = dryrun ]; then | |
15 | # we're done leave the files in the staging dir and quit | |
16 | echo "Not uploading dryrun." | |
17 | exit 0 | |
18 | fi | |
19 | ||
20 | ||
21 | if [ $KIND = daily ]; then | |
22 | ||
23 | echo "Copying to the local file server..." | |
24 | destdir=/stuff/temp/$VERSION | |
25 | mkdir -p $destdir | |
26 | cp $STAGING_DIR/* $destdir | |
27 | ||
28 | if [ $skipupload != yes ]; then | |
29 | destdir=$UPLOAD_DAILY_ROOT/$DAILY | |
30 | echo "Copying to the starship at $destdir..." | |
31 | ssh $UPLOAD_HOST "mkdir -p $destdir" | |
32 | scp $STAGING_DIR/* $UPLOAD_HOST:/$destdir | |
33 | ssh $UPLOAD_HOST "cd $destdir && ls -al" | |
34 | ||
35 | ||
36 | # TODO: something to remove old builds from starship, keeping | |
37 | # only N days worth | |
38 | ||
39 | # Send email to wxPython-dev | |
40 | DATE=`date` | |
41 | TO=wxPython-dev@lists.wxwidgets.org | |
42 | ||
43 | cat <<EOF | /usr/sbin/sendmail $TO | |
44 | From: R'bot <rbot@wxpython.org> | |
45 | To: $TO | |
46 | Subject: $DAILY test build uploaded | |
47 | Date: $DATE | |
48 | ||
49 | Hi, | |
50 | ||
51 | A new test build of wxPython has been uploaded to starship. | |
52 | ||
53 | Version: $VERSION | |
54 | URL: http://starship.python.net/crew/robind/wxPython/daily/$DAILY | |
55 | Changes: http://starship.python.net/crew/robind/wxPython/daily/$DAILY/CHANGES.html | |
56 | ||
57 | Have fun! | |
58 | R'bot | |
59 | ||
60 | EOF | |
61 | fi | |
62 | ||
63 | echo "Cleaning up staging dir..." | |
64 | rm $STAGING_DIR/* | |
65 | rmdir $STAGING_DIR | |
66 | ||
67 | exit 0 | |
68 | fi | |
69 | ||
70 | ||
71 | if [ $KIND = release ]; then | |
72 | ||
73 | echo "Copying to the local file server..." | |
74 | destdir=/stuff/Development/wxPython/dist/$VERSION | |
75 | mkdir -p $destdir | |
76 | cp $STAGING_DIR/* $destdir | |
77 | ||
78 | if [ $skipupload != yes ]; then | |
79 | echo "Copying to the starship..." | |
80 | destdir=$UPLOAD_PREVIEW_ROOT/$VERSION | |
81 | ssh $UPLOAD_HOST "mkdir -p $destdir" | |
82 | scp $STAGING_DIR/* $UPLOAD_HOST:/$destdir | |
83 | ||
84 | # Send email to wxPython-dev | |
85 | DATE=`date` | |
86 | TO=wxPython-dev@lists.wxwidgets.org | |
87 | ||
88 | cat <<EOF | /usr/sbin/sendmail $TO | |
89 | From: R'bot <rbot@wxpython.org> | |
90 | To: $TO | |
91 | Subject: $VERSION release candidate build uploaded | |
92 | Date: $DATE | |
93 | ||
94 | Hi, | |
95 | ||
96 | A new RC build of wxPython has been uploaded to starship. | |
97 | ||
98 | Version: $VERSION | |
99 | URL: http://starship.python.net/crew/robind/wxPython/preview/$VERSION | |
100 | Changes: http://starship.python.net/crew/robind/wxPython/preview/$VERSION/CHANGES.html | |
101 | ||
102 | Have fun! | |
103 | R'bot | |
104 | ||
105 | EOF | |
106 | ||
107 | fi | |
108 | ||
109 | echo "Cleaning up staging dir..." | |
110 | rm $STAGING_DIR/* | |
111 | rmdir $STAGING_DIR | |
112 | ||
113 | exit 0 | |
114 | fi | |
115 |