From 835cacb031faabadf2c09de51323506f8f41b4ef Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:04:28 -0500 Subject: fixes qmk.fm linking, tests out auto version incrementing --- util/travis_compiled_push.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') 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 -- cgit v1.2.1 From 3a76f24cbdd0894af85fee79e371c5ca7cda0f71 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:42:18 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 9f23db972f..f12da913cf 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -26,21 +26,25 @@ else echo "No essential files modified." fi -make ergodox-ez AUTOGEN=true - -find . -name ".build" | xargs rm -rf -cd .. -git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git -cd qmk.fm -git submodule update --init --recursive -rm -rf keyboard -rm -rf keyboards -cp -r ../qmk_firmware/keyboards . -mkdir keyboards/ergodox_ez/ -cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html -cp ../qmk_firmware/readme.md qmk_readme.md -./generate.sh - -git add -A -git commit -m "generated from qmk/qmk_firmware@${rev}" -git push +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then + + make ergodox-ez AUTOGEN=true + + find . -name ".build" | xargs rm -rf + cd .. + git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git + cd qmk.fm + git submodule update --init --recursive + rm -rf keyboard + rm -rf keyboards + cp -r ../qmk_firmware/keyboards . + mkdir keyboards/ergodox_ez/ + cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html + cp ../qmk_firmware/readme.md qmk_readme.md + ./generate.sh + + git add -A + git commit -m "generated from qmk/qmk_firmware@${rev}" + git push + +fi \ No newline at end of file -- cgit v1.2.1 From 98adda34c9095658fcc6a294a13f1264752b4df6 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:54:54 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f12da913cf..f1b4b2ae59 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -21,7 +21,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-$TRAVIS_BRANCH else echo "No essential files modified." fi -- cgit v1.2.1 From cf8dac3538feffe4d52c0776456dd67d5787b059 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 16:56:39 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index f1b4b2ae59..d0bb0db55e 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -7,6 +7,8 @@ rev=$(git rev-parse --short HEAD) git config --global user.name "Travis CI" git config --global user.email "jack.humb+travis.ci@gmail.com" +if [[ "$TRAVIS_BRANCH" == "master" ]] ; then + increment_version () { declare -a part=( ${1//\./ } ) @@ -21,7 +23,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-$TRAVIS_BRANCH + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-master else echo "No essential files modified." fi @@ -47,4 +49,6 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git commit -m "generated from qmk/qmk_firmware@${rev}" git push +fi + fi \ No newline at end of file -- cgit v1.2.1 From ee386a29d1a8b46f16c5c139db74624f829d9a53 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 17:00:30 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index d0bb0db55e..b70999c72f 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -23,7 +23,7 @@ if [[ $NEFM -gt 0 ]] ; then lasttag=$(git tag | grep -Ev '\-' | head -1) newtag=$(increment_version $lasttag) git tag $newtag - git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware-master + git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware else echo "No essential files modified." fi -- cgit v1.2.1 From 5c8cdfd2b579c198ad37504772e663783f530685 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 17:51:20 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index b70999c72f..8025ccb8fe 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -20,7 +20,8 @@ increment_version () 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) + git fetch --tags + lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware -- cgit v1.2.1 From 35edb382ee6390e1208806ce74d7dc1f4ab08f5d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 6 Feb 2017 18:28:37 -0500 Subject: [skip build] testing travis script --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 8025ccb8fe..3751da1e53 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -21,7 +21,7 @@ NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/ if [[ $NEFM -gt 0 ]] ; then echo "Essential files modified." git fetch --tags - lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort | awk '{print $4}' | tail -1) + lasttag=$(git tag | grep -Ev '\-' | xargs -I@ git log --format=format:"%ai @%n" -1 @ | sort -V | awk '{print $4}' | tail -1) newtag=$(increment_version $lasttag) git tag $newtag git push --tags -q https://$GH_TOKEN@github.com/qmk/qmk_firmware -- cgit v1.2.1 From 19d63ad72c012ee3dfb9375724067b278593df8a Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 01:35:10 -0500 Subject: try building only keyboards needed --- util/travis_compiled_push.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 3751da1e53..6ec558cac6 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -38,9 +38,9 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then git clone https://$GH_TOKEN@github.com/jackhumbert/qmk.fm.git cd qmk.fm git submodule update --init --recursive - rm -rf keyboard - rm -rf keyboards - cp -r ../qmk_firmware/keyboards . + #rm -rf keyboard + #rm -rf keyboards + yes | cp -rf ../qmk_firmware/keyboards . mkdir keyboards/ergodox_ez/ cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html cp ../qmk_firmware/readme.md qmk_readme.md -- cgit v1.2.1 From de659486f52db6492be6ca03ce5450690f5d891d Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 7 Feb 2017 12:36:25 -0500 Subject: pass through travis errors --- util/travis_compiled_push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/travis_compiled_push.sh') diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 6ec558cac6..de2481ce54 100644 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -41,7 +41,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then #rm -rf keyboard #rm -rf keyboards yes | cp -rf ../qmk_firmware/keyboards . - mkdir keyboards/ergodox_ez/ + #mkdir keyboards/ergodox_ez/ cp ../qmk_firmware/util/ergodox_ez.html keyboards/ergodox_ez/index.html cp ../qmk_firmware/readme.md qmk_readme.md ./generate.sh -- cgit v1.2.1