Fix setting the default value of version in Makefile

As each command in a make target is executed separately, a variable set in one
command isn't available in the following commands.
This commit is contained in:
Erik Flodin 2020-10-10 10:12:31 +02:00
parent 95c17d0bc5
commit 3741b92737
No known key found for this signature in database
GPG Key ID: 420A7C865EE3F85F
1 changed files with 2 additions and 2 deletions

View File

@ -102,8 +102,8 @@ test:
fi
.PHONY: testhost
testhost: version ?= HEAD
testhost: require-docker
@version=HEAD
@rm -rf /tmp/testhost
@git show $(version):yadm > /tmp/testhost
@chmod a+x /tmp/testhost
@ -117,8 +117,8 @@ testhost: require-docker
bash -l
.PHONY: scripthost
scripthost: version ?= HEAD
scripthost: require-docker
@version=HEAD
@rm -rf /tmp/testhost
@git show $(version):yadm > /tmp/testhost
@chmod a+x /tmp/testhost