Skip to content

Commit 6bf3003

Browse files
authored
Merge pull request #132 from seemethere/fix_enbsubst
[TAR-917] ci: Update addprefix to add another `$`
2 parents 5ccc69f + 13623a6 commit 6bf3003

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ VOLUME_MOUNTS=-v "$(CURDIR)":/v
66
SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117)
77
SHELLCHECK=docker run --rm $(VOLUME_MOUNTS) -w /v koalaman/shellcheck $(SHELLCHECK_EXCLUSIONS)
88

9-
ENVSUBST_VARS=SCRIPT_COMMIT_SHA
9+
ENVSUBST_VARS=LOAD_SCRIPT_COMMIT_SHA
1010

1111
.PHONY: build
12+
build: build/install.sh
1213

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

1718
.PHONY: shellcheck
1819
shellcheck: build/install.sh

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set -e
1616
#
1717
# Git commit from https://github.com/docker/docker-install when
1818
# the script was uploaded (Should only be modified by upload job):
19-
SCRIPT_COMMIT_SHA=${SCRIPT_COMMIT_SHA}
19+
SCRIPT_COMMIT_SHA="${LOAD_SCRIPT_COMMIT_SHA}"
2020

2121

2222
# The channel to install from:

0 commit comments

Comments
 (0)