travis: Don't save key on branches other than master.

This commit is contained in:
Tim 'mithro' Ansell 2017-12-21 14:15:28 +01:00
parent 6cc6262c9a
commit 9e3a80316a
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,11 @@
set -e
set +x
if [ ! -z "$TRAVIS_BRANCH" -a "$TRAVIS_BRANCH" != "master" ]; then
echo "On $TRAVIS_BRANCH, not saving key."
exit 0
fi
if [ ! -z "$GH_KEY" ]; then
ssh-agent > ~/.ssh/agent.sh
. ~/.ssh/agent.sh