diff --git a/Makefile b/Makefile index 639c691..cda82e9 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ SYMLINK_PREFIX := library_ REGISTRY := git.query.consul OWNER := unkin DATE_TAG := $(shell date +%Y%m%d) -SUFFIX=$(shell basename $(mktemp -u) | cut -d . -f 2) +SUFFIX=$(shell basename $$(mktemp -u) | cut -d . -f 2) GIT_BRANCH=$(shell git branch --show-current) GIT_COMMIT := $(shell git rev-parse --short HEAD) @@ -82,7 +82,7 @@ $(DIRS): packer build . ) # Update build timestamp and date in Consul if on master branch - @if [ "$(BRANCH)" = "master" ]; then \ + @if [ "$(GIT_BRANCH)" = "master" ]; then \ echo "Current branch is $(GIT_BRANCH), updating consul."; \ CURRENT_TIMESTAMP=$$(date +%s); \ READABLE_DATE=$$(date '+%Y-%m-%d %H:%M:%S %Z'); \ diff --git a/ci/build.sh b/ci/build.sh index 55681ed..8e34e4d 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -9,7 +9,7 @@ images_changes=$(git diff --name-only master | grep -E '^images/') # Run `make all` if there are changes in builds/ if [ -n "$builds_changes" ]; then echo "Changes detected in builds/. Running 'make build-all'..." - make build-all + make all fi # Run specific `make` commands for each changed file in images/