summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/build-x86_64-static.sh
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-05-26 12:19:27 +1000
committerGitHub <noreply@github.com>2020-05-26 12:19:27 +1000
commita20e8f163fde7d64cbc258b6903230dda651adf9 (patch)
treee39afc950b1740c4853a346eb8a98f3f72f2e1ef /packaging/makeself/build-x86_64-static.sh
parentb5f5675cb53d4b2f276666b55ef582aa8ba7a574 (diff)
Add CI for our Static Netdata builds (which kickstart-static64 uses) (#9130)
* Add tool to build the static x864_64 Netdata * Add error if the netdata binary is not statically linked * Add Github Workflow for testing static builds * Don't use docker run -i -t if not on a tty
Diffstat (limited to 'packaging/makeself/build-x86_64-static.sh')
-rwxr-xr-xpackaging/makeself/build-x86_64-static.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/packaging/makeself/build-x86_64-static.sh b/packaging/makeself/build-x86_64-static.sh
index 7326dd2055..dca6f1ae08 100755
--- a/packaging/makeself/build-x86_64-static.sh
+++ b/packaging/makeself/build-x86_64-static.sh
@@ -32,10 +32,16 @@ if ! docker inspect "${DOCKER_CONTAINER_NAME}" > /dev/null 2>&1; then
fi
# Run the build script inside the container
-run docker run -a stdin -a stdout -a stderr -i -t -v \
- "$(pwd)":/usr/src/netdata.git:rw \
- "${DOCKER_CONTAINER_NAME}" \
- /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
+if [ -t 1 ]; then
+ run docker run -a stdin -a stdout -a stderr -i -t -v \
+ "$(pwd)":/usr/src/netdata.git:rw \
+ "${DOCKER_CONTAINER_NAME}" \
+ /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
+else
+ run docker run -v "$(pwd)":/usr/src/netdata.git:rw \
+ "${DOCKER_CONTAINER_NAME}" \
+ /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
+fi
if [ "${USER}" ]; then
sudo chown -R "${USER}" .