diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 07:31:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 07:31:03 +0000 |
commit | 50485bedfd9818165aa1d039d0abe95a559134b7 (patch) | |
tree | 79c7b08f67edcfb0c936e7a22931653b91189b9f /.travis/releaser.sh | |
parent | Releasing debian version 1.11.1+dfsg-7. (diff) | |
download | netdata-50485bedfd9818165aa1d039d0abe95a559134b7.tar.xz netdata-50485bedfd9818165aa1d039d0abe95a559134b7.zip |
Merging upstream version 1.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.travis/releaser.sh')
-rwxr-xr-x | .travis/releaser.sh | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/.travis/releaser.sh b/.travis/releaser.sh index c184cc72..870dec52 100755 --- a/.travis/releaser.sh +++ b/.travis/releaser.sh @@ -34,17 +34,41 @@ export GIT_USER="netdatabot" echo "--- Initialize git configuration ---" git config user.email "${GIT_MAIL}" git config user.name "${GIT_USER}" +git checkout master +git pull echo "---- FIGURING OUT TAGS ----" # tagger.sh is sourced since we need environment variables it sets #shellcheck source=/dev/null source .travis/tagger.sh || exit 0 +# variable GIT_TAG is produced by tagger.sh script + +echo "---- UPDATE VERSION FILE ----" +echo "$GIT_TAG" >packaging/version +git add packaging/version + +echo "---- GENERATE CHANGELOG -----" +./.travis/generate_changelog.sh +git add CHANGELOG.md + +echo "---- COMMIT AND PUSH CHANGES ----" +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 +# After those operations output of command `git describe` should be identical with a value of GIT_TAG + +if [[ $(git describe) =~ -rc* ]]; then + echo "This is a release candidate tag, exiting without artifact building" + exit 0 +fi echo "---- CREATING TAGGED DOCKER CONTAINERS ----" export REPOSITORY="netdata/netdata" -./docker/build.sh +./packaging/docker/build.sh echo "---- CREATING RELEASE ARTIFACTS -----" +# Artifacts are stored in `artifacts/` directory ./.travis/create_artifacts.sh echo "---- CREATING RELEASE DRAFT WITH ASSETS -----" @@ -63,12 +87,8 @@ if [ "${GIT_TAG}" != "$(git tag --points-at)" ]; then echo "ERROR! Current commit is not tagged. Stopping release creation." exit 1 fi -if [ -z ${RC+x} ]; then - hub release create --prerelease --draft -a "netdata-${GIT_TAG}.tar.gz" -a "netdata-${GIT_TAG}.gz.run" -a "sha256sums.txt" -m "${GIT_TAG}" "${GIT_TAG}" -else - hub release create --draft -a "netdata-${GIT_TAG}.tar.gz" -a "netdata-${GIT_TAG}.gz.run" -a "sha256sums.txt" -m "${GIT_TAG}" "${GIT_TAG}" -fi - -# Changelog needs to be created AFTER new release to avoid problems with circular dependencies and wrong entries in changelog file -echo "---- GENERATING CHANGELOG -----" -./.travis/generate_changelog.sh +hub release create --draft \ + -a "artifacts/netdata-${GIT_TAG}.tar.gz" \ + -a "artifacts/netdata-${GIT_TAG}.gz.run" \ + -a "artifacts/sha256sums.txt" \ + -m "${GIT_TAG}" "${GIT_TAG}" |