Skip to content

Commit 235fed3

Browse files
committed
Makefile: avoid leaking GIT_INDEX_FILE shenanigans to additional commands
Signed-off-by: Elijah Newren <[email protected]>
1 parent 0cd8a1f commit 235fed3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ release: github_release pypi_release
8585
# Call like this:
8686
# make GITHUB_COM_TOKEN=$KEY TAGNAME=v2.23.0 github_release
8787
github_release: export FILEBASE=git-filter-repo-$(shell echo $(TAGNAME) | tail -c +2)
88-
github_release: export GIT_INDEX_FILE=$(shell mktemp)
88+
github_release: export TMP_INDEX_FILE=$(shell mktemp)
8989
github_release: export COMMIT=$(shell git rev-parse HEAD)
9090
github_release: update_docs
9191
test -n "$(GITHUB_COM_TOKEN)"
@@ -99,14 +99,14 @@ github_release: update_docs
9999
git tag -a -m "filter-repo $(TAGNAME)" $(TAGNAME) $$COMMIT
100100
git push origin $(TAGNAME)
101101
# Create the tarball
102-
git read-tree $$COMMIT
102+
GIT_INDEX_FILE=$$TMP_INDEX_FILE git read-tree $$COMMIT
103103
git ls-tree -r docs | grep filter-repo \
104104
| sed -e 's%\t%\tDocumentation/%' \
105-
| git update-index --index-info
106-
git write-tree \
105+
| GIT_INDEX_FILE=$$TMP_INDEX_FILE git update-index --index-info
106+
GIT_INDEX_FILE=$$TMP_INDEX_FILE git write-tree \
107107
| xargs git archive --prefix=$(FILEBASE)/ \
108108
| xz -c >$(FILEBASE).tar.xz
109-
rm $$GIT_INDEX_FILE
109+
rm $$TMP_INDEX_FILE
110110
# Make GitHub mark our new tag as an official release
111111
curl -s -H "Authorization: token $(GITHUB_COM_TOKEN)" -X POST \
112112
https://api.github.com/repos/newren/git-filter-repo/releases \

0 commit comments

Comments
 (0)