summaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorPaul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com>2019-05-17 13:27:15 +0300
committerGitHub <noreply@github.com>2019-05-17 13:27:15 +0300
commita0fbb47c97dd1f6bd4af8faac6e1fcecb041424a (patch)
tree865a1d895b84c82191f010c78f42cb2d2a752541 /.travis
parent73e108f698f1cfd54f3bda223a810a9d2c1a1fa8 (diff)
netdata/packaging: Fix makeself packaging (#6041)
* netdata/packaging: Fix makeself with the new package dependencies * netdata/packaging: Allow artifacts to be built under different repository when needed
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/create_artifacts.sh24
1 files changed, 19 insertions, 5 deletions
diff --git a/.travis/create_artifacts.sh b/.travis/create_artifacts.sh
index f49f79c257..9670f229a4 100755
--- a/.travis/create_artifacts.sh
+++ b/.travis/create_artifacts.sh
@@ -1,11 +1,24 @@
-#!/bin/bash
+#!/usr/bin/env bash
+#
+# Artifacts creation script.
+# This script generates two things:
+# 1) The static binary that can run on all linux distros (built-in dependencies etc)
+# 2) The distribution source tarbal
+#
+# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
+#
+# Author: Paul Emm. Katsoulakis <paul@netdata.cloud>
+#
# shellcheck disable=SC2230
set -e
-if [ ! -f .gitignore ]; then
- echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
- exit 1
+# If we are not in netdata git repo, at the top level directory, fail
+TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
+CWD=$(git rev-parse --show-cdup || echo "")
+if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
+ echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
+ exit 1
fi
if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
@@ -13,8 +26,9 @@ if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
exit 0
fi;
+
echo "--- Initialize git configuration ---"
-git checkout master
+git checkout "${1-master}"
git pull
# Everything from this directory will be uploaded to GCS