diff options
| -rwxr-xr-x | util/travis_compiled_push.sh | 16 | ||||
| -rwxr-xr-x | util/travis_push.sh | 18 |
2 files changed, 11 insertions, 23 deletions
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index c05b842a0..d76030f83 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh | |||
| @@ -1,9 +1,6 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" | 3 | source util/travis_push.sh |
| 4 | TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" | ||
| 5 | TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" | ||
| 6 | TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" | ||
| 7 | 4 | ||
| 8 | set -o errexit -o nounset | 5 | set -o errexit -o nounset |
| 9 | 6 | ||
| @@ -12,17 +9,6 @@ echo "Using git hash ${rev}" | |||
| 12 | 9 | ||
| 13 | if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then | 10 | if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then |
| 14 | 11 | ||
| 15 | git config --global user.name "QMK Bot" | ||
| 16 | git config --global user.email "hello@qmk.fm" | ||
| 17 | |||
| 18 | openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d | ||
| 19 | tar xvf secrets.tar | ||
| 20 | |||
| 21 | chmod 600 id_rsa_qmk_firmware | ||
| 22 | chmod 600 id_rsa_qmk.fm | ||
| 23 | eval `ssh-agent -s` | ||
| 24 | ssh-add id_rsa_qmk_firmware | ||
| 25 | |||
| 26 | # convert to unix line-endings | 12 | # convert to unix line-endings |
| 27 | git checkout master | 13 | git checkout master |
| 28 | git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix | 14 | git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix |
diff --git a/util/travis_push.sh b/util/travis_push.sh index 7eea88b14..d100f9d48 100755 --- a/util/travis_push.sh +++ b/util/travis_push.sh | |||
| @@ -5,13 +5,15 @@ TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" | |||
| 5 | TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" | 5 | TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" |
| 6 | TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" | 6 | TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" |
| 7 | 7 | ||
| 8 | git config --global user.name "QMK Bot" | 8 | if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then |
| 9 | git config --global user.email "hello@qmk.fm" | 9 | git config --global user.name "QMK Bot" |
| 10 | git config --global user.email "hello@qmk.fm" | ||
| 10 | 11 | ||
| 11 | openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d | 12 | openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d |
| 12 | tar xvf secrets.tar | 13 | tar xvf secrets.tar |
| 13 | 14 | ||
| 14 | chmod 600 id_rsa_qmk_firmware | 15 | chmod 600 id_rsa_qmk_firmware |
| 15 | chmod 600 id_rsa_qmk.fm | 16 | chmod 600 id_rsa_qmk.fm |
| 16 | eval `ssh-agent -s` | 17 | eval `ssh-agent -s` |
| 17 | ssh-add id_rsa_qmk_firmware | 18 | ssh-add id_rsa_qmk_firmware |
| 19 | fi | ||
