aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-10-18 10:51:22 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-10-18 10:51:22 +0200
commit7409b84ef3246e59d1fc123506191a7a108fa2ba (patch)
treef51965e5bdf865c718b1a66cfb086bb9fb467086
parent186c1e154706828909de62914434bff046a93c6a (diff)
downloadgo-git-7409b84ef3246e59d1fc123506191a7a108fa2ba.tar.gz
travis: install_key
-rw-r--r--.travis.yml7
-rw-r--r--.travis/install_key.sh4
2 files changed, 6 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index 74f9a68..a9b1d3c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,11 +10,8 @@ matrix:
before_install:
- # we only decrypt the ssh key when we aren't in a pull request
- - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then openssl aes-256-cbc -K $encrypted_1477e58fe67a_key -iv $encrypted_1477e58fe67a_iv -in .travis/deploy.pem.enc -out .travis/deploy.pem -d; fi'
- - eval "$(ssh-agent -s)"
- - chmod 600 .travis/deploy.pem
- - ssh-add .travis/deploy.pem
+ # we only decrypt the SSH key when we aren't in a pull request
+ - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash .travis/install_key.sh; fi'
install:
- rm -rf $GOPATH/src/gopkg.in/src-d
diff --git a/.travis/install_key.sh b/.travis/install_key.sh
new file mode 100644
index 0000000..0206686
--- /dev/null
+++ b/.travis/install_key.sh
@@ -0,0 +1,4 @@
+openssl aes-256-cbc -K $encrypted_1477e58fe67a_key -iv $encrypted_1477e58fe67a_iv -in .travis/deploy.pem.enc -out .travis/deploy.pem -d
+eval "$(ssh-agent -s)"
+chmod 600 .travis/deploy.pem
+ssh-add .travis/deploy.pem