Skip to content

Commit

Permalink
Merge pull request docker#132 from seemethere/fix_enbsubst
Browse files Browse the repository at this point in the history
[TAR-917] ci: Update addprefix to add another `$`
  • Loading branch information
seemethere authored Jul 15, 2019
2 parents 5ccc69f + 13623a6 commit 6bf3003
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ VOLUME_MOUNTS=-v "$(CURDIR)":/v
SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117)
SHELLCHECK=docker run --rm $(VOLUME_MOUNTS) -w /v koalaman/shellcheck $(SHELLCHECK_EXCLUSIONS)

ENVSUBST_VARS=SCRIPT_COMMIT_SHA
ENVSUBST_VARS=LOAD_SCRIPT_COMMIT_SHA

.PHONY: build
build: build/install.sh

build/install.sh: install.sh
mkdir -p $(@D)
SCRIPT_COMMIT_SHA='"$(shell git rev-parse HEAD)"' envsubst '$(addprefix $,$(ENVSUBST_VARS))' < $< > $@
LOAD_SCRIPT_COMMIT_SHA='$(shell git rev-parse HEAD)' envsubst '$(addprefix $$,$(ENVSUBST_VARS))' < $< > $@

.PHONY: shellcheck
shellcheck: build/install.sh
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -e
#
# Git commit from https://github.com/docker/docker-install when
# the script was uploaded (Should only be modified by upload job):
SCRIPT_COMMIT_SHA=${SCRIPT_COMMIT_SHA}
SCRIPT_COMMIT_SHA="${LOAD_SCRIPT_COMMIT_SHA}"


# The channel to install from:
Expand Down

0 comments on commit 6bf3003

Please sign in to comment.