Merge pull request 'fix: multiple fixes' (#3) from neoloc/fix_consul_commits into master

Reviewed-on: https://git.query.consul/unkin/packer-images/pulls/3
This commit is contained in:
Ben Vincent 2025-01-12 16:48:47 +11:00
commit 780176088d
2 changed files with 3 additions and 3 deletions

View File

@ -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'); \

View File

@ -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/