]> git.saurik.com Git - wxWidgets.git/blame - wxPython/distrib/all/build-finalize
slight refactor
[wxWidgets.git] / wxPython / distrib / all / build-finalize
CommitLineData
e4bb5998
RD
1#!/bin/bash
2#----------------------------------------------------------------------
3
4set -o errexit
5
6# read the config variables from the file given on the command line
f1a9f331 7# . $1
e4bb5998
RD
8
9
10
11
12chmod a+r $STAGING_DIR/*
13
14if [ $KIND = dryrun ]; then
15 # we're done leave the files in the staging dir and quit
16 echo "Not uploading dryrun."
17 exit 0
18fi
19
20
21if [ $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"
486afba9 32 scp -p $STAGING_DIR/* $UPLOAD_HOST:/$destdir
e4bb5998
RD
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
44From: R'bot <rbot@wxpython.org>
45To: $TO
46Subject: $DAILY test build uploaded
47Date: $DATE
48
49Hi,
50
51A 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
57Have fun!
58R'bot
59
60EOF
61 fi
62
63 echo "Cleaning up staging dir..."
64 rm $STAGING_DIR/*
65 rmdir $STAGING_DIR
66
67 exit 0
68fi
69
70
71if [ $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"
486afba9 82 scp -p $STAGING_DIR/* $UPLOAD_HOST:/$destdir
e4bb5998
RD
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
89From: R'bot <rbot@wxpython.org>
90To: $TO
91Subject: $VERSION release candidate build uploaded
92Date: $DATE
93
94Hi,
95
96A new RC build of wxPython has been uploaded to starship.
97
98 Version: $VERSION
391a2d0e
RD
99 URL: http://starship.python.net/crew/robind/wxPython/rc/$VERSION
100 Changes: http://starship.python.net/crew/robind/wxPython/rc/$VERSION/CHANGES.html
e4bb5998
RD
101
102Have fun!
103R'bot
104
105EOF
106
107 fi
108
109 echo "Cleaning up staging dir..."
110 rm $STAGING_DIR/*
111 rmdir $STAGING_DIR
112
113 exit 0
114fi
115