Merge pull request #4554 from mwichmann/move-env-checker
[scons.git] / bin / upload-release-files.sh
blob65e92062b8e5b8420884d06b959dec3968dc06a5
1 #!/bin/bash
2 set -e
3 set -x
5 if [[ $# -lt 2 ]]; then
6 echo Usage: $0 VERSION SF_USERNAME
7 exit 1
8 fi
10 VERSION=$1; shift
11 SF_USER=$1; shift
13 RSYNC='rsync'
14 RSYNCOPTS='-v -e ssh'
15 SF_MACHINE='frs.sourceforge.net'
16 SF_TOPDIR='/home/frs/project/scons'
18 # the build products are here:
19 cd build/dist
20 cp -f ../../CHANGES.txt ../../RELEASE.txt .
21 cp -f ../../README-SF.rst ./README.rst
23 set -x
25 # upload README
26 $RSYNC $RSYNCOPTS\
27 README.rst \
28 $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons/
31 # Upload main scons release files:
32 $RSYNC $RSYNCOPTS \
33 SCons-$VERSION.tar.gz \
34 SCons-$VERSION.zip \
35 CHANGES.txt RELEASE.txt \
36 $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons/$VERSION/
38 # Local packages:
39 $RSYNC $RSYNCOPTS \
40 scons-local-$VERSION.tar.gz \
41 scons-local-$VERSION.zip \
42 scons-local-$VERSION.pyz \
43 CHANGES.txt RELEASE.txt \
44 $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-local/$VERSION/
46 ## Source packages:
47 #$RSYNC $RSYNCOPTS \
48 # scons-src-$VERSION.tar.gz \
49 # scons-src-$VERSION.zip \
50 # CHANGES.txt RELEASE.txt \
51 # $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-src/$VERSION/
53 # Readme
54 $RSYNC $RSYNCOPTS \
55 README.rst \
56 $SF_USER@$SF_MACHINE:$SF_TOPDIR/
60 # scons.org stuff:
62 # Doc: copy the doc tgz over; we'll unpack later
63 $RSYNC $RSYNCOPTS \
64 scons-doc-$VERSION.tar.gz \
65 scons@scons.org:public_html/production/doc/$VERSION/
66 # Copy the changelog
67 $RSYNC $RSYNCOPTS \
68 CHANGES.txt \
69 scons@scons.org:public_html/production/
70 # Note that Announce.txt gets copied over to RELEASE.txt.
71 # This should be fixed at some point.
72 $RSYNC $RSYNCOPTS \
73 RELEASE.txt \
74 scons@scons.org:public_html/production/RELEASE.txt
75 # Unpack the doc and repoint doc symlinks:
76 ssh scons@scons.org "
77 cd public_html/production/doc
78 cd $VERSION
79 tar xvf scons-doc-$VERSION.tar.gz
80 cd ..
81 rm latest; ln -s $VERSION latest
82 rm production; ln -s $VERSION production
83 for f in HTML PDF EPUB PS TEXT; do rm -f \$f; ln -s $VERSION/\$f \$f; done
85 echo '*****'
86 echo '***** Now manually update index.php, includes/versions.php and news-raw.xhtml on scons.org.'
87 echo '*****'