summaryrefslogtreecommitdiff
path: root/util/travis_compiled_push.sh
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-02-06 16:04:28 -0500
committerJack Humbert <jack.humb@gmail.com>2017-02-06 16:04:28 -0500
commit835cacb031faabadf2c09de51323506f8f41b4ef (patch)
tree093b049545e4361fb66318635a5bb61c2843552d /util/travis_compiled_push.sh
parentf0633f2540be3ba86797522a2075a9f5ba2ad5c6 (diff)
downloadqmk_firmware-835cacb031faabadf2c09de51323506f8f41b4ef.tar.gz
qmk_firmware-835cacb031faabadf2c09de51323506f8f41b4ef.zip
fixes qmk.fm linking, tests out auto version incrementing
Diffstat (limited to 'util/travis_compiled_push.sh')
-rw-r--r--util/travis_compiled_push.sh21
1 files changed, 20 insertions, 1 deletions
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh
index f432976d03..9f23db972f 100644
--- a/util/travis_compiled_push.sh
+++ b/util/travis_compiled_push.sh
@@ -7,6 +7,25 @@ rev=$(git rev-parse --short HEAD)
git config --global user.name "Travis CI"
git config --global user.email "jack.humb+travis.ci@gmail.com"
+increment_version ()
+{
+ declare -a part=( ${1//\./ } )
+ part[2]=$((part[2] + 1))
+ new="${part[*]}"
+ echo -e "${new// /.}"
+}
+
+NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | wc -l)
+if [[ $NEFM -gt 0 ]] ; then
+ echo "Essential files modified."
+ lasttag=$(git tag | grep -Ev '\-' | head -1)
+ newtag=$(increment_version $lasttag)
+ git tag $newtag
+ git push --tags
+else
+ echo "No essential files modified."
+fi
+
make ergodox-ez AUTOGEN=true
find . -name ".build" | xargs rm -rf
@@ -23,5 +42,5 @@ cp ../qmk_firmware/readme.md qmk_readme.md
./generate.sh
git add -A
-git commit -m "generated from qmk_firmware/$TRAVIS_BRANCH@${rev}"
+git commit -m "generated from qmk/qmk_firmware@${rev}"
git push