Remove SSH set up related code

Remove the code added in order to set up the SSH connection,
and instead, use travis-scripts' helper function `set-up-ssh`.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: https://github.com/alrra/travis-scripts/issues/19
This commit is contained in:
Cătălin Mariș
2016-03-28 02:46:09 +03:00
parent 55d0985e6f
commit a2bf312950
4 changed files with 13 additions and 33 deletions

View File

@@ -1,9 +1,19 @@
# For more information about the configurations used
# in this file, please see the Travis CI documentation:
# http://docs.travis-ci.com
# https://docs.travis-ci.com
after_success:
- ./scripts/travis/auto_update_dist.sh
- |
# Automatically update the content from the `dist/` directory
$(npm bin)/travis-after-all \
&& $(npm bin)/set-up-ssh -k "$encrypted_7289798db853_key" \
-iv "$encrypted_7289798db853_iv" \
--path-encrypted-key ".travis/github_deploy_key.enc" \
&& $(npm bin)/commit-changes --branch "master" \
--commands "npm run build" \
--commit-message "Update content from the \`dist\` directory [skip ci]"
env:
global:

View File

@@ -5,7 +5,7 @@
]
},
"devDependencies": {
"@alrra/travis-scripts": "^2.0.0",
"@alrra/travis-scripts": "^2.1.0",
"apache-server-configs": "2.14.0",
"archiver": "^0.21.0",
"babel-core": "^6.7.2",

View File

@@ -1,30 +0,0 @@
#!/bin/bash
declare -r PRIVATE_KEY_FILE_NAME='github_deploy_key'
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Decrypt the file containing the private key
openssl aes-256-cbc \
-K $encrypted_7289798db853_key \
-iv $encrypted_7289798db853_iv \
-in "$(dirname "$BASH_SOURCE")/${PRIVATE_KEY_FILE_NAME}.enc" \
-out ~/.ssh/$PRIVATE_KEY_FILE_NAME -d
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Enable SSH authentication
chmod 600 ~/.ssh/$PRIVATE_KEY_FILE_NAME
echo "Host github.com" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/$PRIVATE_KEY_FILE_NAME" >> ~/.ssh/config
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Automatically update the content from the `dist/` directory
$(npm bin)/travis-after-all && \
$(npm bin)/commit-changes --branch "master" \
--commands "npm run build" \
--commit-message "Update content from the \`dist\` directory [skip ci]"