@cryptotaxi247 / netdata-1 / commits / 19e4b1c85

Move changelog generation to the end in release pipeline (#4712)

* move changelog generation to the end of release pipeline and create [netdata patch release] * fix configure.ac autocommit when tag is a rc tag * do not create a release when commit is not tagged

Paweł Krupa committed Nov 22, 2018 at 22:02 UTC 19e4b1c85e8e43788a08617af4cbacff0d8a170e
3 files changed +10 -5
.travis/releaser.sh
+8 -3
@@ -40,9 +40,6 @@ echo "---- FIGURING OUT TAGS ----"
40 #shellcheck source=/dev/null
41 source .travis/tagger.sh || exit 0
42
43 -echo "---- GENERATING CHANGELOG -----"
44 -./.travis/generate_changelog.sh
45 -
43 echo "---- CREATING TAGGED DOCKER CONTAINERS ----"
44 export REPOSITORY="netdata/netdata"
45 ./docker/build.sh
@@ -62,8 +59,16 @@ if [ -z ${GIT_TAG+x} ]; then
59 echo "Variable GIT_TAG is not set. Something went terribly wrong! Exiting."
60 exit 1
61 fi
62 +if [ "${GIT_TAG}" != "$(git tag --points-at)" ]; then
63 + echo "ERROR! Current commit is not tagged. Stopping release creation."
64 + exit 1
65 +fi
66 if [ -z ${RC+x} ]; then
67 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}"
68 else
69 hub release create --draft -a "netdata-${GIT_TAG}.tar.gz" -a "netdata-${GIT_TAG}.gz.run" -a "sha256sums.txt" -m "${GIT_TAG}" "${GIT_TAG}"
70 fi
71 +
72 +# Changelog needs to be created AFTER new release to avoid problems with circular dependencies and wrong entries in changelog file
73 +echo "---- GENERATING CHANGELOG -----"
74 +./.travis/generate_changelog.sh
.travis/tagger.sh
+1 -1
@@ -28,7 +28,7 @@ function embed_version {
28 VERSION="$1"
29 MAJOR=$(echo "$GIT_TAG" | cut -d . -f 1 | cut -d v -f 2)
30 MINOR=$(echo "$GIT_TAG" | cut -d . -f 2)
31 - PATCH=$(echo "$GIT_TAG" | cut -d . -f 3)
31 + PATCH=$(echo "$GIT_TAG" | cut -d . -f 3 | cut -d '-' -f 1)
32 sed -i "s/\\[VERSION_MAJOR\\], \\[.*\\]/\\[VERSION_MAJOR\\], \\[$MAJOR\\]/" configure.ac
33 sed -i "s/\\[VERSION_MINOR\\], \\[.*\\]/\\[VERSION_MINOR\\], \\[$MINOR\\]/" configure.ac
34 sed -i "s/\\[VERSION_PATCH\\], \\[.*\\]/\\[VERSION_PATCH\\], \\[$PATCH\\]/" configure.ac
configure.ac
+1 -1
@@ -6,7 +6,7 @@ AC_PREREQ(2.60)
6
7 define([VERSION_MAJOR], [1])
8 define([VERSION_MINOR], [11])
9 -define([VERSION_FIX], [1])
9 +define([VERSION_FIX], [0])
10 define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
11 define([VERSION_SUFFIX], [_rolling])
12