From 0ce74b1da9c9d21457bbd6dd7ec6dc7fe769a93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 21 Jan 2019 16:29:33 +0100 Subject: [PATCH] fix use of toolversion by using absolute GIT_ROOT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- docker/base/Makefile | 3 +-- docker/linux/Makefile | 1 + docker/windows/Makefile | 1 + scripts/lib/setup/packages.sh | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/base/Makefile b/docker/base/Makefile index 8aee426219..3fa4bc33ef 100644 --- a/docker/base/Makefile +++ b/docker/base/Makefile @@ -1,4 +1,5 @@ GIT_COMMIT = $(shell git rev-parse --short HEAD) +GIT_ROOT = $(shell git rev-parse --show-toplevel) # Software Versions, URLs, and Checksums NVM_VERSION = v0.33.11 @@ -6,8 +7,6 @@ NVM_INSTALL_SCRIPT = nvm_$(NVM_VERSION)_install.sh NVM_NODE_VERSION = v10.14.0 LEIN_VERSION = stable -GIT_ROOT = $(shell git rev-parse --show-toplevel) - # WARNING: Remember to change the tag when updating the image IMAGE_TAG = 1.0.0 IMAGE_NAME = statusteam/status-build-base:$(IMAGE_TAG) diff --git a/docker/linux/Makefile b/docker/linux/Makefile index 55212eefe4..2367ac7530 100644 --- a/docker/linux/Makefile +++ b/docker/linux/Makefile @@ -1,6 +1,7 @@ __toolversion = $(shell $(GIT_ROOT)/scripts/toolversion $(1)) GIT_COMMIT = $(shell git rev-parse --short HEAD) +GIT_ROOT = $(shell git rev-parse --show-toplevel) # WARNING: Change version in Dockerfile too QT_VERSION = 5.11.2 diff --git a/docker/windows/Makefile b/docker/windows/Makefile index 593ee52a62..9d9f44c0ed 100644 --- a/docker/windows/Makefile +++ b/docker/windows/Makefile @@ -1,6 +1,7 @@ __toolversion = $(shell $(GIT_ROOT)/scripts/toolversion $(1)) GIT_COMMIT = $(shell git rev-parse --short HEAD) +GIT_ROOT = $(shell git rev-parse --show-toplevel) # WARNING: Remember to change the tag when updating the image IMAGE_TAG = 1.1.1 diff --git a/scripts/lib/setup/packages.sh b/scripts/lib/setup/packages.sh index a43f11f1f7..6ae9cb6ad6 100755 --- a/scripts/lib/setup/packages.sh +++ b/scripts/lib/setup/packages.sh @@ -4,6 +4,8 @@ # Install checks ######## +GIT_ROOT=$(git rev-parse --show-toplevel) + function program_exists() { local program=$1 command -v "$program" >/dev/null 2>&1 @@ -25,7 +27,7 @@ function program_version_exists() { } function toolversion() { - ./toolversion "${1}" + ${GIT_ROOT}/scripts/toolversion "${1}" } ########