From 3a1e92ae5d6071d8064230c6f62563d56116e042 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Sun, 19 May 2019 10:23:42 +0200 Subject: [PATCH] Update 'dev' tag on success --- .travis.yml | 3 +++ update-dev-tag.sh | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100755 update-dev-tag.sh diff --git a/.travis.yml b/.travis.yml index ba42b74..3e7cbec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,6 +69,9 @@ script: - cmake -DGATTLIB_FORCE_DBUS=TRUE -DCMAKE_BUILD_TYPE=Release .. && make VERBOSE=1 && cpack .. - popd +after_success: + - if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then ./update-dev-tag.sh; fi + before_deploy: # Create directory to store the artifacts we want to deploy - mkdir artifacts diff --git a/update-dev-tag.sh b/update-dev-tag.sh new file mode 100755 index 0000000..d87118f --- /dev/null +++ b/update-dev-tag.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +git config --global user.email "olivier@labapart.com" +git config --global user.name "Olivier Martin" +git tag -f dev -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER" +git push --quiet https://${GITHUB_OAUTH_TOKEN}@github.com/labapart/gattlib --force dev > /dev/null 2>&1