-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let Travis update the "snapshot" tag after every build
This required a GitHub deployment key with write access to be added to the repository. It is encrypted with by using the encrypt-file functionality of Travis. See here: http://docs.travis-ci.com/user/encrypting-files/
- Loading branch information
Showing
3 changed files
with
23 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
Binary file not shown.
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,22 @@ | ||
#!/bin/sh | ||
|
||
[email protected]:buddycloud/buddycloud-server-java.git | ||
|
||
# Decrypt the deployment key for Git push access | ||
openssl aes-256-cbc -K $encrypted_937d176d0339_key -iv $encrypted_937d176d0339_iv -in .travis/deploy_key.enc -out .travis/deploy_key -d | ||
ssh-add .travis/deploy_key.enc | ||
|
||
# Import the deployment key | ||
chmod 600 .travis/deploy_key | ||
eval `ssh-agent -s` | ||
ssh-add .travis/deploy_key | ||
|
||
# Set Git committer information | ||
git config user.name "Travis CI" | ||
git config user.email "[email protected]" | ||
|
||
# Remove the `snapshot` tag and re-add it to point to the latest commit | ||
git tag -d snapshot | ||
git push $GIT_URL :snapshot | ||
git tag -a snapshot -m "Latest Snapshot" | ||
git push --tags $GIT_URL |