summaryrefslogtreecommitdiff
path: root/bin/upload-release-files.sh
blob: c853bdaa928932f371ded9f49513e2a1a882de23 (plain)
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
#!/bin/sh
set -e
set -x

if [ $# -lt 2 ]; then
	echo Usage: $0 VERSION SF_USERNAME
	exit 1
fi

VERSION=$1; shift
SF_USER=$1; shift

RSYNC='rsync'
RSYNCOPTS='-v -e ssh'
SF_MACHINE='frs.sourceforge.net'
SF_TOPDIR='/home/frs/project/scons'

# the build products are here:
cd build/dist
cp -f ../../src/CHANGES.txt ../../src/RELEASE.txt ../../src/Announce.txt ../../src/README.txt .

cp scons-$VERSION.win32.exe scons-$VERSION-setup.exe
cp scons-$VERSION.win-amd64.exe scons-$VERSION-amd64-setup.exe

set -x

# Upload main scons release files:
$RSYNC $RSYNCOPTS \
  scons-$VERSION-1.noarch.rpm \
  scons-$VERSION-1.src.rpm \
  scons-$VERSION-setup.exe \
  scons-$VERSION-amd64-setup.exe \
  scons-$VERSION.tar.gz \
  scons-$VERSION.zip \
  Announce.txt CHANGES.txt RELEASE.txt \
  $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons/$VERSION/

# Local packages:
$RSYNC $RSYNCOPTS \
  scons-local-$VERSION.tar.gz \
  scons-local-$VERSION.zip \
  Announce.txt CHANGES.txt RELEASE.txt \
  $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-local/$VERSION/

# Source packages:
$RSYNC $RSYNCOPTS \
  scons-src-$VERSION.tar.gz \
  scons-src-$VERSION.zip \
  Announce.txt CHANGES.txt RELEASE.txt \
  $SF_USER@$SF_MACHINE:$SF_TOPDIR/scons-src/$VERSION/

# Readme
$RSYNC $RSYNCOPTS \
  README.txt  \
  $SF_USER@$SF_MACHINE:$SF_TOPDIR/



#
# scons.org stuff:
#
# Doc: copy the doc tgz over; we'll unpack later
$RSYNC $RSYNCOPTS \
  scons-doc-$VERSION.tar.gz \
  scons@scons.org:public_html/production/doc/$VERSION/
# Copy the changelog
$RSYNC $RSYNCOPTS \
  CHANGES.txt \
  scons@scons.org:public_html/production/
# Note that Announce.txt gets copied over to RELEASE.txt.
# This should be fixed at some point.
$RSYNC $RSYNCOPTS \
  Announce.txt \
  scons@scons.org:public_html/production/RELEASE.txt
# Unpack the doc and repoint doc symlinks:
ssh scons@scons.org "
  cd public_html/production/doc
  cd $VERSION
  tar xvf scons-doc-$VERSION.tar.gz
  cd ..
  rm latest; ln -s $VERSION latest
  rm production; ln -s $VERSION production
  for f in HTML PDF EPUB PS TEXT; do rm \$f; ln -s $VERSION/\$f \$f; done
"
echo '*****'
echo '***** Now manually update index.php, includes/versions.php and news-raw.xhtml on scons.org.'
echo '*****'