File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -40,3 +40,7 @@ notifications:
40404141 on_success : change
4242 on_failure : always
43+
44+ env :
45+ global :
46+ - ENCRYPTION_LABEL : " 7a1322f4b03c"
Original file line number Diff line number Diff line change 5151 echo " on a tag -> set pom.xml <version> to next SNAPSHOT $new_snapshot "
5252 mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion=$new_snapshot
5353 mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:commit
54+ # Save some useful information
55+ REPO=` git config remote.origin.url`
56+ SSH_REPO=${REPO/ https: \/\/ github.com\/ / git@ github.com: }
57+ git clone $REPO out
58+ # Clean out existing contents
59+ cd out
5460 git config user.name " Travis CI"
5561 git config user.email
" [email protected] " 56- git remote add upstream " https://$GITHUB_API_TOKEN @github.com/CurrencyFair/OneSignal-Java-SDK.git"
57- git fetch upstream
62+ yes | cp -f ../pom.xml pom.xml
5863 git add pom.xml
5964 git commit -m " [Travis-CI] next snapshot version"
60- git push --quiet upstream master > /dev/null 2>&1
65+
66+ # Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
67+ ENCRYPTED_KEY_VAR=" encrypted_${ENCRYPTION_LABEL} _key"
68+ ENCRYPTED_IV_VAR=" encrypted_${ENCRYPTION_LABEL} _iv"
69+ ENCRYPTED_KEY=${! ENCRYPTED_KEY_VAR}
70+ ENCRYPTED_IV=${! ENCRYPTED_IV_VAR}
71+ openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in .travis/deploy_key.enc -out .travis/deploy_key -d
72+ chmod 600 .travis/deploy_key
73+ eval ` ssh-agent -s`
74+ ssh-add .travis/deploy_key
75+
76+ # Now that we're all set up, we can push.
77+ git push $SSH_REPO $TARGET_BRANCH
6178fi
You can’t perform that action at this time.
0 commit comments