-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsuper-release.sh
More file actions
executable file
·51 lines (33 loc) · 888 Bytes
/
super-release.sh
File metadata and controls
executable file
·51 lines (33 loc) · 888 Bytes
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
#!/bin/bash -ex
CLOSE_VERSION="$1"
SNAPSHOT_VERSION="$2"
STOP=0
if [ "x$CLOSE_VERSION" == "x" ]; then
STOP=1;
fi;
if [ "x$SNAPSHOT_VERSION" == "x" ]; then
STOP=1;
fi;
if git status -s | grep ".\\+"; then
STOP=1;
fi
if [ "x$STOP" == "x0" ]; then
mvn clean install
fi
if git status -s | grep ".\\+"; then
STOP=1;
fi
if [ "x$STOP" == "x0" ]; then
mvn versions:set -DnewVersion=$CLOSE_VERSION
git commit -am "releasing phantom2java-$CLOSE_VERSION"
git tag phantom2java-$CLOSE_VERSION
git push origin phantom2java-$CLOSE_VERSION
mvn clean install -Dmaven.test.skip.exec
mvn deploy -e -DreleaseMail -Dmaven.test.skip.exec
mvn versions:set -DnewVersion=$SNAPSHOT_VERSION -DgenerateBackupPoms=false
git commit -am "releasing phantom2java-$CLOSE_VERSION"
git push
mvn versions:commit
else
echo "Script usage: ./super-release.sh 0.0.1 0.0.2-SNAPSHOT"
fi