diff options
Diffstat (limited to 'util/travis_compiled_push.sh')
| -rwxr-xr-x | util/travis_compiled_push.sh | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh deleted file mode 100755 index 73a9e3bc4..000000000 --- a/util/travis_compiled_push.sh +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | source util/travis_utils.sh | ||
| 4 | source util/travis_push.sh | ||
| 5 | |||
| 6 | set -o errexit -o nounset | ||
| 7 | |||
| 8 | rev=$(git rev-parse --short HEAD) | ||
| 9 | echo "Using git hash ${rev}" | ||
| 10 | |||
| 11 | if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then | ||
| 12 | |||
| 13 | git checkout master | ||
| 14 | |||
| 15 | git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | ||
| 16 | |||
| 17 | if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then | ||
| 18 | make generate-keyboards-file SILENT=true > .keyboards | ||
| 19 | cd .. | ||
| 20 | git clone git@github.com:qmk/qmk.fm.git | ||
| 21 | cd qmk.fm | ||
| 22 | mv ../qmk_firmware/id_rsa_qmk.fm id_rsa_qmk.fm | ||
| 23 | mv ../qmk_firmware/.keyboards . | ||
| 24 | ssh-add -D | ||
| 25 | eval `ssh-agent -s` | ||
| 26 | ssh-add id_rsa_qmk.fm | ||
| 27 | |||
| 28 | # don't delete files in case not all keyboards are built | ||
| 29 | # rm -f compiled/*.hex | ||
| 30 | |||
| 31 | # ignore errors here | ||
| 32 | # In theory, this is more flexible, and will allow for additional expansion of additional types of files and other names | ||
| 33 | mv ../qmk_firmware/*_default.*{hex,bin} ./compiled/ || true | ||
| 34 | |||
| 35 | # get the list of keyboards | ||
| 36 | readarray -t keyboards < .keyboards | ||
| 37 | |||
| 38 | # replace / with _ | ||
| 39 | keyboards=("${keyboards[@]//[\/]/_}") | ||
| 40 | |||
| 41 | # remove all binaries that don't belong to a keyboard in .keyboards | ||
| 42 | for file in "./compiled"/* ; do | ||
| 43 | match=0 | ||
| 44 | for keyboard in "${keyboards[@]}" ; do | ||
| 45 | if [[ ${file##*/} = "${keyboard}_default.bin" ]] || [[ ${file##*/} = "${keyboard}_default.hex" ]]; then | ||
| 46 | match=1 | ||
| 47 | break | ||
| 48 | fi | ||
| 49 | done | ||
| 50 | if [[ $match = 0 ]]; then | ||
| 51 | echo "Removing deprecated binary: $file" | ||
| 52 | rm "$file" | ||
| 53 | fi | ||
| 54 | done | ||
| 55 | |||
| 56 | bash _util/generate_keyboard_page.sh | ||
| 57 | git add -A | ||
| 58 | git commit -m "generated from qmk/qmk_firmware@${rev}" | ||
| 59 | git push git@github.com:qmk/qmk.fm.git | ||
| 60 | |||
| 61 | fi | ||
| 62 | |||
| 63 | fi | ||
