fix(build): source script

Shouldn't have "" else the empty string will cause issue.

Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
rjshrjndrn 2024-03-14 17:59:49 +01:00
parent 36b6dfb5bd
commit 0f9eca733a
2 changed files with 5 additions and 4 deletions

View file

@ -9,7 +9,8 @@
# Usage: IMAGE_TAG=latest DOCKER_REPO=myDockerHubID bash build.sh <ee>
set -e
source ../scripts/lib/_docker.sh
GIT_ROOT=$(git rev-parse --show-toplevel)
source $GIT_ROOT/scripts/lib/_docker.sh
git_sha=$(git rev-parse --short HEAD)
image_tag=${IMAGE_TAG:-$git_sha}
@ -92,4 +93,4 @@ function build_api() {
}
check_prereq
build_api i1 i2
build_api "$1" "$2"

View file

@ -1,11 +1,11 @@
#!/bin/bash
docker() {
local docker_cmd=${DOCKER_RUNTIME}
local docker_cmd=${DOCKER_RUNTIME:-"docker"}
[[ $docker_cmd == "docker" ]] && docker_cmd=$(which docker)
if [[ "$1" == "build" ]]; then
shift
# Reconstruct command with DOCKER_ARGS before the '.'
$docker_cmd build "${DOCKER_BUILD_ARGS}" "$@"
$docker_cmd build ${DOCKER_BUILD_ARGS} "$@"
else
$docker_cmd "$@"
fi