summaryrefslogtreecommitdiffstats
path: root/.travis/create_artifacts.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:31:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:31:03 +0000
commit50485bedfd9818165aa1d039d0abe95a559134b7 (patch)
tree79c7b08f67edcfb0c936e7a22931653b91189b9f /.travis/create_artifacts.sh
parentReleasing debian version 1.11.1+dfsg-7. (diff)
downloadnetdata-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/create_artifacts.sh')
-rwxr-xr-x.travis/create_artifacts.sh37
1 files changed, 20 insertions, 17 deletions
diff --git a/.travis/create_artifacts.sh b/.travis/create_artifacts.sh
index 40ba9c85f..ca0724e19 100755
--- a/.travis/create_artifacts.sh
+++ b/.travis/create_artifacts.sh
@@ -1,33 +1,36 @@
#!/bin/bash
# shellcheck disable=SC2230
-if [ ! -f .gitignore ]
-then
- echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
- exit 1
+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);'
echo "--- Create tarball ---"
autoreconf -ivf
-./configure
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-zlib --with-math --with-user=netdata CFLAGS=-O2
make dist
-echo "--- Create self-extractor ---"
-./makeself/build-x86_64-static.sh
+mv "${BASENAME}.tar.gz" artifacts/
-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 "--- Create self-extractor ---"
+./packaging/makeself/build-x86_64-static.sh
+# Needed fo GCS
+echo "--- Copy artifacts to separate directory ---"
+#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"
echo "checksums:"
cat sha256sums.txt
-