forked from MobiVM/robovm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·76 lines (58 loc) · 3.15 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
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
#!/bin/sh
set -e
: ${RELEASE_VERSION?"Need to set env var RELEASE_VERSION, e.g. 2.0.0"}
: ${DEVELOPMENT_VERSION?"Need to set env var DEVELOPMENT_VERSION for next development version, e.g. 2.1.0 (don't include SNAPSHOT)"}
export RELEASE_VERSION=$RELEASE_VERSION
export DEVELOPMENT_VERSION=$DEVELOPMENT_VERSION
export TIMESTAMP=`date +"%Y%m%d%H%M"`
# release compiler/ and dist/
mvn --batch-mode -Dtag=robovm-$RELEASE_VERSION -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVELOPMENT_VERSION-SNAPSHOT release:prepare
mvn --batch-mode -Dtag=robovm-$RELEASE_VERSION -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVELOPMENT_VERSION-SNAPSHOT release:perform
# release plugins/eclipse
cd plugins/eclipse
# Set the pom version to the release version
mvn org.eclipse.tycho:tycho-versions-plugin:0.20.0:set-version -DnewVersion="$RELEASE_VERSION.$TIMESTAMP"
mv ui/pom.xml ui/pom.xml.bak && sed "s/<robovm.version>.*<\/robovm.version>/<robovm.version>$RELEASE_VERSION<\/robovm.version>/" ui/pom.xml.bak > ui/pom.xml
# Create the update site for the release version
mvn clean install
git commit -am "Set release version of Eclipse plugin, $RELEASE_VERSION"
git push
# Copy the update-site/target/ to whereever you want it
ssh [email protected] "mkdir -p /usr/share/nginx/html/downloads/releases/eclipse/$RELEASE_VERSION"
scp -r update-site/target/site/ [email protected]:/usr/share/nginx/html/downloads/releases/eclipse/$RELEASE_VERSION/
# Set the pom version to the next development version
mv ui/pom.xml.bak ui/pom.xml
mvn org.eclipse.tycho:tycho-versions-plugin:0.20.0:set-version -DnewVersion="$DEVELOPMENT_VERSION-SNAPSHOT"
git commit -am "Set next development version of Eclipse plugin, $DEVELOPMENT_VERSION"
git push
# release plugins/idea
cd ../idea
# Set the pom version to the release version
mvn versions:set -DnewVersion=$RELEASE_VERSION
mvn versions:commit
# Create the plugin Jar for the release version
mvn clean install -Pdeployment
git commit -am "Set release version of IDEA plugin, $RELEASE_VERSION"
git push
# Copy the target/*-dist.jar to whereever you want it
scp target/org.robovm.idea-$RELEASE_VERSION-plugin-dist.jar [email protected]:/usr/share/nginx/html/downloads/releases/idea
# Set the pom version to the next development version
mvn versions:set -DnewVersion=$DEVELOPMENT_VERSION-SNAPSHOT
mvn versions:commit
git commit -am "Set next development version of IDEA plugin, $DEVELOPMENT_VERSION"
git push
# Publish Gradle plugin
cd ../gradle
# Set release version
sed "s/^version *=.*/version = '$RELEASE_VERSION'/" build.gradle | sed "s/roboVMVersion *=.*/ roboVMVersion = '$RELEASE_VERSION'/" > build.gradle.tmp
mv build.gradle.tmp build.gradle
./gradlew clean build install
git commit -am "Set release version of Gradle plugin, $RELEASE_VERSION"
git push
# Release
./gradlew uploadArchives
# Set development version
sed "s/^version *=.*/version = '$DEVELOPMENT_VERSION-SNAPSHOT'/" build.gradle | sed "s/roboVMVersion *=.*/ roboVMVersion = '$DEVELOPMENT_VERSION-SNAPSHOT'/" > build.gradle.tmp
mv build.gradle.tmp build.gradle
git commit -am "Set next development version of Gradle plugin, $DEVELOPMENT_VERSION-SNAPSHOT"
git push