Skip to content

Commit 9d8f20c

Browse files
committed
modernise scripts a bit
1 parent 7c0dd48 commit 9d8f20c

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

‎scripts/snapshot-with-git.cm‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
#!/bin/bash
2+
set -u
3+
set -e
4+
5+
BASE_DIR="$( cd "$( /usr/bin/dirname "${BASH_SOURCE[0]}" )/.." && /bin/pwd )"
6+
7+
cd "$BASE_DIR"
28
ant -Dversion="GIT-$(git log -1 --oneline | cut -d " " -f 1)"
39

‎scripts/upload_files.cm‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
#!/bin/bash
2+
set -u
3+
set -e
4+
5+
BASE_DIR="$( cd "$( /usr/bin/dirname "${BASH_SOURCE[0]}" )/.." && /bin/pwd )"
6+
BUILD_DIR="$BASE_DIR/build"
27

38
VERSION=${1:?no version}${2:?no release-candidate flag (can be an empty string)}
49
echo "Version: $VERSION"
10+
511
CREDENTIALS="-u ${3:?no Google Code username} -w ${4:?mp Google Code password}"
612
echo "Credentials: ${CREDENTIALS}"
713

814
LABELS="Type-Archive,OpSys-All,${1},${2}"
915

1016
# Hmmm. multiple labels don't seem to work properly.
11-
./googlecode_upload.py -s "Full Hamcrest distribution (tgz)" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-$VERSION.tgz
12-
./googlecode_upload.py -s "Full Hamcrest distribution (zip)" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-$VERSION.zip
13-
./googlecode_upload.py -s "Hamcrest core Jar (bare-bones minimum)" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-core-$VERSION.jar
14-
./googlecode_upload.py -s "Hamcrest all-in-one Jar" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-all-$VERSION.jar
15-
./googlecode_upload.py -s "Hamcrest code generator tool" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-generator-$VERSION.jar
16-
./googlecode_upload.py -s "Hamcrest testing library integration" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-integration-$VERSION.jar
17-
./googlecode_upload.py -s "Hamcrest additional library of matchers" -p hamcrest ${CREDENTIALS} -l "$LABELS" build/hamcrest-library-$VERSION.jar
17+
./googlecode_upload.py -s "Full Hamcrest distribution (tgz)" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-$VERSION.tgz
18+
./googlecode_upload.py -s "Full Hamcrest distribution (zip)" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-$VERSION.zip
19+
./googlecode_upload.py -s "Hamcrest core Jar (bare-bones minimum)" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-core-$VERSION.jar
20+
./googlecode_upload.py -s "Hamcrest all-in-one Jar" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-all-$VERSION.jar
21+
./googlecode_upload.py -s "Hamcrest code generator tool" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-generator-$VERSION.jar
22+
./googlecode_upload.py -s "Hamcrest testing library integration" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-integration-$VERSION.jar
23+
./googlecode_upload.py -s "Hamcrest additional library of matchers" -p hamcrest ${CREDENTIALS} -l "$LABELS" $BUILD_DIR/hamcrest-library-$VERSION.jar
1824

0 commit comments

Comments
 (0)