Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
improved release script
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters