diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-11-23 14:46:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-23 14:46:26 +0200 |
commit | b3723053755420b5df9e5a11ca6b115368f9b27a (patch) | |
tree | 50935670ea04a4b2da2c19b950f56e720fea0ac7 /.travis/tagger.sh | |
parent | fc75d6550268eed0e98748ceaf73dbd9e43a860f (diff) |
Better changelog generation when releasing new version (#4728)
* consolidate commiting in release pipeline; generate changelog before tagging
* fix how rc0 is created
Diffstat (limited to '.travis/tagger.sh')
-rwxr-xr-x | .travis/tagger.sh | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/.travis/tagger.sh b/.travis/tagger.sh index b1907c3476..80e86d7afe 100755 --- a/.travis/tagger.sh +++ b/.travis/tagger.sh @@ -40,14 +40,14 @@ function embed_version { function release_candidate { LAST_TAG=$(git semver) if [[ $LAST_TAG =~ -rc* ]]; then - LAST_RELEASE=$(echo "$LAST_TAG" | cut -d'-' -f 1) + VERSION=$(echo "$LAST_TAG" | cut -d'-' -f 1) LAST_RC=$(echo "$LAST_TAG" | cut -d'c' -f 2) RC=$((LAST_RC + 1)) else - LAST_RELEASE=$LAST_TAG + VERSION="$(git semver --next-minor)" RC=0 fi - GIT_TAG="v$LAST_RELEASE-rc$RC" + GIT_TAG="v$VERSION-rc$RC" export GIT_TAG } @@ -62,20 +62,8 @@ if [ -z "${GIT_TAG}" ]; then *"[netdata minor release]"*) GIT_TAG="v$(git semver --next-minor)" ;; *"[netdata major release]"*) GIT_TAG="v$(git semver --next-major)" ;; *"[netdata release candidate]"*) release_candidate ;; - *) echo "Keyword not detected. Exiting..."; exit 1;; + *) echo "Keyword not detected. Exiting..."; exit 0;; esac - # Tag it! - if [ "$GIT_TAG" != "HEAD" ]; then - echo "Assigning a new tag: $GIT_TAG" - embed_version "$GIT_TAG" - git commit -m "[ci skip] release $GIT_TAG" - git tag "$GIT_TAG" -a -m "Automatic tag generation for travis build no. $TRAVIS_BUILD_NUMBER" - git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')" - git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')" --tags - fi -else - embed_version "$GIT_TAG" - git commit -m "[ci skip] release $GIT_TAG" - git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')" fi +embed_version "$GIT_TAG" export GIT_TAG |