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