Skip to content

Commit 823be58

Browse files
Support for git and svn repo types
1 parent 509b9c6 commit 823be58

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

release.sh

+12-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ NEXT_SNAPSHOT_VERSION=$NEXT_VERSION-SNAPSHOT
2222

2323
# Updates the version, commits, builds the war and executable war, and releases those two artifacts to GitHub
2424
mvn versions:set -DnewVersion=$RELEASE_VERSION
25-
git commit -m "Preparing to release $RELEASE_VERSION"
26-
git push origin HEAD
25+
if [ -d ".git" ]; then
26+
git commit -m "Preparing to release $RELEASE_VERSION"
27+
git push origin HEAD
28+
elif [ -d ".svn" ]; then
29+
svn commit -m "Preparing to release $RELEASE_VERSION"
30+
fi
2731
mvn clean package
2832
mvn package -Dmaven.test.skip=true -P embedded-jetty -Dlogback.configuration.file=src/main/docker/logback.xml
2933
mvn github-release:release
@@ -41,8 +45,12 @@ docker push $REPO
4145

4246
# Version bump to prepare next snapshot
4347
mvn versions:set -DnewVersion=$NEXT_SNAPSHOT_VERSION
44-
git commit -m "Prepare for next development iteration: $NEXT_SNAPSHOT_VERSION"
45-
git push origin HEAD
48+
if [ -d ".git" ]; then
49+
git commit -m "Prepare for next development iteration: $NEXT_SNAPSHOT_VERSION"
50+
git push origin HEAD
51+
elif [ -d ".svn" ]; then
52+
svn commit -m "Prepare for next development iteration: $NEXT_SNAPSHOT_VERSION"
53+
fi
4654

4755

4856
else

0 commit comments

Comments
 (0)