Skip to content

Commit

Permalink
create temp directory for calens when cloning repository
Browse files Browse the repository at this point in the history
Backport of bebbd4c

(cherry picked from commit 8396497)
  • Loading branch information
rhafer committed Oct 12, 2023
1 parent 76263de commit cf5232c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cf5232c

Please sign in to comment.