From 7a39c38fe9a620633ce1a1116120336f4fffdd73 Mon Sep 17 00:00:00 2001 From: Wido den Hollander Date: Wed, 13 Jan 2021 13:31:01 +0100 Subject: [PATCH] tools/docker: Change directory to docker.sh's directory By switching to this directory we can use relative paths regardless of how people execute the script. cd tools ./docker.sh OR ./tools/docker.sh OR /path/to/git-repo/tools/docker.sh --- tools/docker.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/docker.sh b/tools/docker.sh index 21406b691..6b8ecdb78 100755 --- a/tools/docker.sh +++ b/tools/docker.sh @@ -19,6 +19,8 @@ set -e set -x +cd $(dirname $0) + GIT_TAG="$(git tag --points-at | head -n 1)" if [ -n "${GIT_REV}" ]; then LABEL_GIT_TAG="--label \"org.opencontainers.image.version=${GIT_TAG}\""