Skip to content

Instantly share code, notes, and snippets.

@chrisirhc
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisirhc/97341ad5f609cbb66d50 to your computer and use it in GitHub Desktop.
Save chrisirhc/97341ad5f609cbb66d50 to your computer and use it in GitHub Desktop.
Release repo
script:
- cp -a src build
- ls -la build
after_success: .travis/make-release.sh
#!/bin/bash
if [ "$TRAVIS_BRANCH" == "master" ]; then
openssl aes-256-cbc -K $encrypted_0e643f7c177c_key -iv $encrypted_0e643f7c177c_iv -in .travis/id_release.enc -out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
git clone --depth 1 git@github.com:chrisirhc/_test-proj-releases.git release
mv build/* release/
version=`git rev-parse --short HEAD`
cd release/
git add .
git config user.name "Bot"
git commit -m "$version (automatic)"
git push origin master
else
echo "Do nothing since it's not a release branch."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment