Permalink
Browse files

improved release script

  • Loading branch information...
1 parent 4d76796 commit 3bc81cafea523ff160076583a794cb84cb1c07d4 @m2spring m2spring committed Sep 21, 2012
Showing with 85 additions and 0 deletions.
  1. +24 −0 jenkow-plugin/pom.xml
  2. +56 −0 release.sh
  3. +5 −0 update-versions.sh
View
24 jenkow-plugin/pom.xml
@@ -278,6 +278,30 @@ THE SOFTWARE.
</excludes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
View
56 release.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+export PRJ=$(cd `dirname $0`; pwd)
+
+if [ $# != 2 ]; then
+ echo "usage: release.sh <release-version> <next-trunk-version>"
+ exit 1
+fi
+
+RELVER=$1; shift
+NEXTVER=$1; shift
+
+export HOME="$WORKSPACE"
+
+x=${GIT:=git}
+
+x=${MAVEN_HOME:=/auto/surf-tp/configs/surf/tools/apache-maven-3.0.3}
+export MAVEN_HOME
+
+x=${JAVA_HOME:=/auto/java/jdks/lnx/jdk1.6.0_latest}
+export JAVA_HOME
+
+x=${MAVEN_OPTS:=-Xmx4000m -Xms1024m -XX:MaxPermSize=128m}
+export MAVEN_OPTS
+
+x=${MVN_OPTIONS:=-e -B --fail-at-end --update-snapshots}
+x=${MVN_GOAL:=install}
+
+umask 0022
+
+export MVN="$MAVEN_HOME/bin/mvn"
+MVN_REPO="$PRJ/.repository"
+mkdir -p "$MVN_REPO"
+rm -rf "$MVN_REPO/com/cisco" "$MVN_REPO/org/activiti"
+MVN="$MVN -D=maven.repo.local=$MVN_REPO"
+
+cd $PRJ
+
+set -e
+set -x
+
+$GIT checkout -f -b v$RELVER
+./update-versions.sh $RELVER
+$GIT commit -am "created release $RELVER"
+$MVN $MVN_OPTIONS clean install || exit 1
+
+$GIT checkout -f master
+./update-versions.sh $NEXTVER-SNAPSHOT
+$GIT commit -am "new trunk $NEXTVER"
+$MVN $MVN_OPTIONS clean install -Dmaven.test.skip=true || exit 1
+
+$GIT checkout -f v$RELVER
+$MVN $MVN_OPTIONS -f jenkow-plugin deploy -Dmaven.test.skip=true || exit 1
+$GIT checkout -f master
+
+$GIT push --all
View
5 update-versions.sh
@@ -41,6 +41,11 @@ case $NEW_VERSION in
esac
x=${XML:=/usr/cisco/bin/xml}
+if [ ! -x $XML ]; then
+ echo "unable to find XML tool under $XML"
+ exit 1
+fi
+
TS=`date +%Y%m%d-%H%M%S`
function updateAnyVersion ()

0 comments on commit 3bc81ca

Please sign in to comment.