diff --git a/Makefile b/Makefile index 9248e55eb57..6a94968777e 100644 --- a/Makefile +++ b/Makefile @@ -41,11 +41,12 @@ lint-fix: $(GOLANGCI_LINT) gofmt -w . $(GOLANGCI_LINT) run --fix +CALENS_DIR := $(shell mktemp -d) $(CALENS): @mkdir -p $(@D) - git clone --depth 1 --branch v0.2.0 -c advice.detachedHead=false https://github.com/restic/calens.git /tmp/calens - cd /tmp/calens && GOBIN=$(@D) go install - rm -rf /tmp/calens + git clone --depth 1 --branch v0.2.0 -c advice.detachedHead=false https://github.com/restic/calens.git $(CALENS_DIR) + cd $(CALENS_DIR) && GOBIN=$(@D) go install + rm -rf $(CALENS_DIR) .PHONY: check-changelog check-changelog: $(CALENS)