summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.travis/create_artifacts.sh26
-rwxr-xr-x.travis/releaser.sh11
-rwxr-xr-x.travis/tagger.sh2
-rwxr-xr-xpackaging/makeself/jobs/99-makeself.install.sh5
4 files changed, 22 insertions, 22 deletions
diff --git a/.travis/create_artifacts.sh b/.travis/create_artifacts.sh
index 90fb082937..e75ad092d0 100755
--- a/.travis/create_artifacts.sh
+++ b/.travis/create_artifacts.sh
@@ -1,11 +1,17 @@
#!/bin/bash
# shellcheck disable=SC2230
+set -e
+
if [ ! -f .gitignore ]; then
echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
exit 1
fi
+# Everything from this directory will be uploaded to GCS
+mkdir -p artifacts
+BASENAME="netdata-$(git describe)"
+
# Make sure stdout is in blocking mode. If we don't, then conda create will barf during downloads.
# See https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 for details.
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
@@ -13,30 +19,18 @@ echo "--- Create tarball ---"
autoreconf -ivf
./configure
make dist
+mv "${BASENAME}.tar.gz" artifacts/
+
echo "--- Create self-extractor ---"
./packaging/makeself/build-x86_64-static.sh
# Needed fo GCS
echo "--- Copy artifacts to separate directory ---"
-mkdir -p artifacts
-BASENAME="netdata-$(git describe)"
-mv "${BASENAME}".* artifacts/
+#shellcheck disable=SC2164
cd artifacts
ln -s "${BASENAME}.tar.gz" netdata-latest.tar.gz
ln -s "${BASENAME}.gz.run" netdata-latest.gz.run
sha256sum -b ./* >"sha256sums.txt"
-cd ../
-
-# TODO(paulfantom): remove this section after releasing v1.12 and always use "artifacts" directory
-echo "--- Create checksums ---"
-GIT_TAG=$(git tag --points-at)
-if [ "${GIT_TAG}" != "" ]; then
- ln -s netdata-latest.gz.run "netdata-${GIT_TAG}.gz.run"
- ln -s netdata-*.tar.gz "netdata-${GIT_TAG}.tar.gz"
- sha256sum -b "netdata-${GIT_TAG}.gz.run" "netdata-${GIT_TAG}.tar.gz" >"sha256sums.txt"
-else
- sha256sum -b ./*.tar.gz ./*.gz.run >"sha256sums.txt"
-fi
-
echo "checksums:"
cat sha256sums.txt
+
diff --git a/.travis/releaser.sh b/.travis/releaser.sh
index 937cbeb1f1..870dec52c4 100755
--- a/.travis/releaser.sh
+++ b/.travis/releaser.sh
@@ -41,6 +41,7 @@ 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
@@ -55,8 +56,9 @@ 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 [ -z ${RC+x} ]; then
+if [[ $(git describe) =~ -rc* ]]; then
echo "This is a release candidate tag, exiting without artifact building"
exit 0
fi
@@ -66,6 +68,7 @@ export REPOSITORY="netdata/netdata"
./packaging/docker/build.sh
echo "---- CREATING RELEASE ARTIFACTS -----"
+# Artifacts are stored in `artifacts/` directory
./.travis/create_artifacts.sh
echo "---- CREATING RELEASE DRAFT WITH ASSETS -----"
@@ -84,4 +87,8 @@ if [ "${GIT_TAG}" != "$(git tag --points-at)" ]; then
echo "ERROR! Current commit is not tagged. Stopping release creation."
exit 1
fi
-hub release create --draft -a "netdata-${GIT_TAG}.tar.gz" -a "netdata-${GIT_TAG}.gz.run" -a "sha256sums.txt" -m "${GIT_TAG}" "${GIT_TAG}"
+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}"
diff --git a/.travis/tagger.sh b/.travis/tagger.sh
index 1b179b7c1c..e72c5721ce 100755
--- a/.travis/tagger.sh
+++ b/.travis/tagger.sh
@@ -37,8 +37,6 @@ function release_candidate() {
RC=0
fi
GIT_TAG="v$VERSION-rc$RC"
- export GIT_TAG
- export RC
}
# Check if current commit is tagged or not
diff --git a/packaging/makeself/jobs/99-makeself.install.sh b/packaging/makeself/jobs/99-makeself.install.sh
index 647ffd2436..6832986138 100755
--- a/packaging/makeself/jobs/99-makeself.install.sh
+++ b/packaging/makeself/jobs/99-makeself.install.sh
@@ -90,5 +90,6 @@ run rm "${NETDATA_MAKESELF_PATH}/makeself.lsm.tmp"
FILE="netdata-${VERSION}.gz.run"
-run mv "${NETDATA_INSTALL_PATH}.gz.run" "${FILE}"
-echo >&2 "Self-extracting installer moved to '${FILE}'"
+run mkdir -p artifacts
+run mv "${NETDATA_INSTALL_PATH}.gz.run" "artifacts/${FILE}"
+echo >&2 "Self-extracting installer moved to 'artifacts/${FILE}'"