@@ -18,38 +18,34 @@ increment_version_to_next_snapshot ()
1818 new_snapshot=" ${new// / .} -SNAPSHOT"
1919}
2020
21- # increment version to the next snapshot version, commit and push to repository
22- if [ ! -z " $TRAVIS_TAG " ]
23- then
24- # Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
25- openssl aes-256-cbc \
26- -K $encrypted_dd04a63e1379_key \
27- -iv $encrypted_dd04a63e1379_iv \
28- -in .travis/github_deploy_key.enc \
29- -out .travis/github_deploy_key -d
30- chmod 600 .travis/github_deploy_key
31- eval ` ssh-agent -s`
32- ssh-add .travis/github_deploy_key
33- git config --global user.name " $GIT_NAME "
34- git config --global user.email " $GIT_EMAIL "
21+ # Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
22+ openssl aes-256-cbc \
23+ -K $encrypted_dd04a63e1379_key \
24+ -iv $encrypted_dd04a63e1379_iv \
25+ -in .travis/github_deploy_key.enc \
26+ -out .travis/github_deploy_key -d
27+ chmod 600 .travis/github_deploy_key
28+ eval ` ssh-agent -s`
29+ ssh-add .travis/github_deploy_key
30+ git config --global user.name " $GIT_NAME "
31+ git config --global user.email " $GIT_EMAIL "
3532
36- # increment version to the next snapshot version
37- increment_version_to_next_snapshot $TRAVIS_TAG
38- echo " on a tag -> set pom.xml <version> to next SNAPSHOT $new_snapshot "
39- mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion=$new_snapshot
40- mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:commit
33+ # increment version to the next snapshot version
34+ increment_version_to_next_snapshot $TRAVIS_TAG
35+ echo " on a tag -> set pom.xml <version> to next SNAPSHOT $new_snapshot "
36+ mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion=$new_snapshot
37+ mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:commit
4138
42- # Save some useful information
43- REPO=$( git config remote.origin.url)
44- REPO=${REPO/ https: \/\/ github.com\/ / git@ github.com: }
45- REPO_NAME=$( basename $REPO )
46- TARGET_DIR=$( mktemp -d /tmp/$REPO_NAME .XXXX)
47- git clone --branch master ${REPO} ${TARGET_DIR}
48- yes | cp -f pom.xml $TARGET_DIR /
49- cd $TARGET_DIR
50- # Finally add changed pom.xml and commit
51- git add pom.xml
52- git commit -m " [skip ci] [Travis-CI] next snapshot version via Travis build $TRAVIS_BUILD_NUMBER "
53- # Now that we're all set up, we can push
54- git push $REPO master
55- fi
39+ # Save some useful information
40+ REPO=$( git config remote.origin.url)
41+ REPO=${REPO/ https: \/\/ github.com\/ / git@ github.com: }
42+ REPO_NAME=$( basename $REPO )
43+ TARGET_DIR=$( mktemp -d /tmp/$REPO_NAME .XXXX)
44+ git clone --branch master ${REPO} ${TARGET_DIR}
45+ yes | cp -f pom.xml $TARGET_DIR /
46+ cd $TARGET_DIR
47+ # Finally add changed pom.xml and commit
48+ git add pom.xml
49+ git commit -m " [skip ci] [Travis-CI] next snapshot version via Travis build $TRAVIS_BUILD_NUMBER "
50+ # Now that we're all set up, we can push
51+ git push $REPO master
0 commit comments