]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/all/build-finalize
Merge recent changes from 2.8 branch.
[wxWidgets.git] / wxPython / distrib / all / build-finalize
1 #!/bin/bash
2 #----------------------------------------------------------------------
3
4 set -o errexit
5
6
7
8 chmod a+r $STAGING_DIR/*
9
10 if [ $KIND = dryrun ]; then
11 # we're done leave the files in the staging dir and quit
12 echo "Not uploading dryrun."
13 exit 0
14 fi
15
16
17 if [ $KIND = daily ]; then
18
19 echo "Copying to the local file server..."
20 destdir=/stuff/temp/$VERSION
21 mkdir -p $destdir
22 cp -R $STAGING_DIR/* $destdir
23
24 if [ $skipupload != yes ]; then
25 destdir=$UPLOAD_PREVIEW_ROOT/$DAILY
26 echo "Copying to $UPLOAD_HOST at $destdir..."
27 if [ $UPLOAD_METHOD = ssh ]; then
28 ssh $UPLOAD_USER@$UPLOAD_HOST "mkdir -p $destdir"
29 scp -pr $STAGING_DIR/* $UPLOAD_USER@$UPLOAD_HOST:/$destdir
30 fi
31 if [ $UPLOAD_METHOD = ftp ]; then
32 lftp -c "open $UPLOAD_HOST; mkdir $destdir"
33 lftp -c "open $UPLOAD_HOST; cd $destdir; mput $STAGING_DIR/*"
34 fi
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.
52
53 Version: $VERSION
54 URL: $UPLOAD_URL_ROOT/preview/$DAILY
55 Changes: $UPLOAD_URL_ROOT/preview/$DAILY/CHANGES.html
56
57 Have fun!
58 R'bot
59
60 EOF
61 fi
62
63 echo "Cleaning up staging dir..."
64 rm -r $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 -R $STAGING_DIR/* $destdir
77
78 if [ $skipupload != yes ]; then
79 echo "Copying to $UPLOAD_HOST..."
80 destdir=$UPLOAD_RELEASE_ROOT/$VERSION
81 if [ $UPLOAD_METHOD = ssh ]; then
82 ssh $UPLOAD_USER@$UPLOAD_HOST "mkdir -p $destdir"
83 scp -pr $STAGING_DIR/* $UPLOAD_USER@$UPLOAD_HOST:/$destdir
84 fi
85 if [ $UPLOAD_METHOD = ftp ]; then
86 lftp -c "open $UPLOAD_HOST; mkdir $destdir"
87 lftp -c "open $UPLOAD_HOST; cd $destdir; mput $STAGING_DIR/*"
88 fi
89
90 # Send email to wxPython-dev
91 DATE=`date`
92 TO=wxPython-dev@lists.wxwidgets.org
93
94 cat <<EOF | /usr/sbin/sendmail $TO
95 From: R'bot <rbot@wxpython.org>
96 To: $TO
97 Subject: $VERSION release candidate build uploaded
98 Date: $DATE
99
100 Hi,
101
102 A new RC build of wxPython has been uploaded to starship.
103
104 Version: $VERSION
105 URL: $UPLOAD_URL_ROOT/release/$VERSION
106 Changes: $UPLOAD_URL_ROOT/release/$VERSION/CHANGES.html
107
108 Have fun!
109 R'bot
110
111 EOF
112
113 fi
114
115 echo "Cleaning up staging dir..."
116 rm $STAGING_DIR/*
117 rmdir $STAGING_DIR
118
119 exit 0
120 fi
121