Skip to content

Commit 3ab3a79

Browse files
committed
BridJ: updated release script
1 parent 127fbbb commit 3ab3a79

2 files changed

Lines changed: 24 additions & 10 deletions

File tree

libraries/RELEASE.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@
22
- Move Velocity, Utils, BridJ, JNAerator, JavaCL, Parent to release versions
33
- Remove ~/.m2/repository/com/nativelibs4java and make sure the following command succeeds (runs the tests):
44
mvn clean install -o
5-
- Upload artifacts with uploadGoogleCodeDownloads, after editing it to match versions:
6-
scripts/uploadGoogleCodeDownloads
5+
- Deploy to staged repo, create release tags and upload artifacts to Google Code
6+
scripts/tagAndUpload_BridJ_JNAerator_JavaCL
77
- Prepare release notes:
88
- Run this
99
scripts/prepareReleaseNotes
1010
- Paste first section of CHANGELOG.html files into a new post at http://ochafik.com/wp-admin
11-
- Tag new versions in git
12-
git -a bridj-$BRIDJ_VERSION "BridJ version $BRIDJ_VERSION"
13-
git -a jnaerator-$JNAERATOR_VERSION "JNAerator version $JNAERATOR_VERSION"
14-
git -a javacl-$JAVACL_VERSION "JavaCL version $JAVACL_VERSION"
15-
git push --tags
16-
- Deploy to staged repo:
17-
mvn clean javadoc:jar deploy -DskipTests -Pgpg,coordinated-release
1811
- Close staged repo on http://oss.sonatype.org
1912
- Test staged repo with a dummy sbt project
2013
- Release stage repo

libraries/scripts/uploadGoogleCodeDownloads renamed to libraries/scripts/tagAndUpload_BridJ_JNAerator_JavaCL

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,41 @@ function getVersion {
1717
cat "$POM" | grep "<version>" | head -n 1 | sed 's/[^>]*>//' | sed 's/<.*//'
1818
}
1919

20+
function listPOMs {
21+
find $1 -name pom.xml
22+
}
23+
2024
cd `dirname $0`
2125
cd ..
2226

2327
BRIDJ_VERSION=`getVersion BridJ/pom.xml`
2428
JNAERATOR_VERSION=`getVersion jnaerator/pom.xml`
2529
JAVACL_VERSION=`getVersion OpenCL/pom.xml`
30+
ROOT_VERSION=`getVersion pom.xml`
2631

27-
[[ $BRIDJ_VERSION =~ .*-SNAPSHOT || $JNAERATOR_VERSION =~ .*-SNAPSHOT || $JAVACL_VERSION =~ .*-SNAPSHOT ]] && fail "Found snapshot versions: BRIDJ_VERSION = $BRIDJ_VERSION, JNAERATOR_VERSION = $JNAERATOR_VERSION, JAVACL_VERSION = $JAVACL_VERSION"
32+
HAS_SNAPSHOT_VERSION=0
33+
for POM in pom.xml `listPOMs BridJ` `listPOMs jnaerator` `listPOMs OpenCL`; do
34+
VERSION=`getVersion "$POM"`
35+
if [[ $VERSION =~ .*-SNAPSHOT ]]; then
36+
HAS_SNAPSHOT_VERSION=1
37+
echo "Found SNAPSHOT version in '$POM': $VERSION"
38+
fi
39+
done
40+
41+
[[ $HAS_SNAPSHOT_VERSION -eq 0 ]] || fail "Please update versions to release versions and try again"
2842

2943
USER=$1
3044
PASSWORD=$2
3145

3246
[[ -n "$USER" && -n "$PASSWORD" ]]Ê|| fail "Please provide a username and a password for Google Code"
3347

48+
mvn clean javadoc:jar deploy -DskipTests -Pgpg,coordinated-release || fail "Deployment failed"
49+
50+
git -a bridj-$BRIDJ_VERSION "BridJ version $BRIDJ_VERSION" || fail "Failed to create git tag for BridJ"
51+
git -a jnaerator-$JNAERATOR_VERSION "JNAerator version $JNAERATOR_VERSION" || fail "Failed to create git tag for JNAerator"
52+
git -a javacl-$JAVACL_VERSION "JavaCL version $JAVACL_VERSION" || fail "Failed to create git tag for JavaCL"
53+
git push --tags || fail "Failed to push newly-created git tags"
54+
3455
# Modified script to add full description:
3556
# wget http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py
3657

0 commit comments

Comments
 (0)