3 set -o errexit -o nounset
5 rev=$(git rev-parse --short HEAD)
7 if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then
9 git config --global user.name "QMK Bot"
10 git config --global user.email "hello@qmk.fm"
12 openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d
15 chmod 600 id_rsa_qmk_firmware
18 ssh-add id_rsa_qmk_firmware
22 declare -a part=( ${1//\./ } )
23 part[2]=$((part[2] + 1))
28 NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l)
29 if [[ $NEFM -gt 0 ]] ; then
30 echo "Essential files modified."
32 lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1)
33 newtag=$(increment_version $lasttag)
35 git push --tags git@github.com:qmk/qmk_firmware.git
37 echo "No essential files modified."
40 if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then
42 make ergodox-ez AUTOGEN=true
45 git clone git@github.com:qmk/qmk.fm.git
47 ssh-add ../qmk_firmware/qmk.fm
48 #git submodule update --init --recursive
51 #yes | cp -rf ../qmk_firmware/keyboards .
52 #mkdir keyboards/ergodox_ez/
53 #cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html
54 #cp ../qmk_firmware/readme.md qmk_readme.md
57 for file in ../qmk_firmware/keyboards/*/keymaps/*/*.hex; do mv -v "$file" "_compiled/${file##*/}"; done
60 git commit -m "generated from qmk/qmk_firmware@${rev}"
61 git push git@github.com:qmk/qmk.fm.git