-
Notifications
You must be signed in to change notification settings - Fork 1
/
release.sh
executable file
·51 lines (41 loc) · 1.19 KB
/
release.sh
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
#!/bin/sh
# Usage: ./release.sh
#
# Build an official release of garefl, tagged with the current date.
#
# To replace a previous version (e.g., from the previous day), use
# VERSION=-yyyy.mm.dd ./release.sh
#
# Currently version is tied to date
VERSION="${VERSION:-`date +%Y.%m.%d`}"
echo "Creating garefl-$VERSION"
export VERSION
REFLWEB=reflectometry.org:web/danse
NCNRWEB=webster.ncnr.nist.gov:software
REPO=svn+ssh://[email protected]/reflectometry
function okay {
echo $*
echo -n "Press y to continue: "
read ans
test "$ans" != "y" && exit
}
# Check release notes
ls -l RELEASE-NOTES
head -10 RELEASE-NOTES
okay "Are the RELEASE-NOTES up to date, and tagged for $VERSION?"
svn update
svn status
okay "Are all files up to date in the repository?"
make clean
make check
okay "Was the build error free?"
make dist
ls release/*$VERSION*
okay "Are you ready to update the server?"
chmod a+r release/*
scp release/*$VERSION* $NCNRWEB/release
scp release/garefl.html $NCNRWEB
scp release/*$VERSION* $REFLWEB/download
svn copy $REPO/trunk/garefl $REPO/releases/garefl-$VERSION -m "tag release $VERSION"
head -20 RELEASE-NOTES
echo "Copy the release notes onto reflectometry.org and update the links"