From 0fda3c7f4ea8651039ba505fa41a2992518cf61e Mon Sep 17 00:00:00 2001 From: Sylvain Rabot Date: Tue, 2 Mar 2021 10:15:30 +0100 Subject: [PATCH] Upgrade kustomize and use go1.16 Signed-off-by: Sylvain Rabot --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f6ebb46..3410402 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ KUSTOMIZE_SRC ?= $(GOPATH)/src/sigs.k8s.io/kustomize/kustomize KUSTOMIZE_SYLR_REPO ?= https://github.com/sylr/kustomize.git AGE_YAML_SUPPORT_COMMIT ?= d3cd2ad563ad35a349339e899a8ed39f7e29dc02 -KUSTOMIZE_AGE_SUPPORT_COMMIT ?= be09d792963483bf6c5f82aa6b36d522ee963634 +KUSTOMIZE_AGE_SUPPORT_COMMIT ?= 8de35139bca2d568069daa089d4896146fba1426 export GOPATH @@ -19,16 +19,18 @@ all: make-binaries make-binaries: age-binaries kustomize-binaries $(AGE_SRC): - GOPATH=$(GOPATH) $(GO) get -d filippo.io/age/... + # mkdir -p $(shell dirname $(AGE_SRC)) + git clone $(AGE_SYLR_REPO) $(AGE_SRC) -age-git-reset: +age-git-reset: $(AGE_SRC) git -C "$(AGE_SRC)" remote add sylr $(AGE_SYLR_REPO) || true git -C "$(AGE_SRC)" remote update git -C "$(AGE_SRC)" rev-parse --verify kustomize-age || git -C "$(AGE_SRC)" checkout -b kustomize-age $(AGE_YAML_SUPPORT_COMMIT) git -C "$(AGE_SRC)" rev-parse --verify kustomize-age && git -C "$(AGE_SRC)" checkout kustomize-age && git -C "$(AGE_SRC)" reset --hard $(AGE_YAML_SUPPORT_COMMIT) $(KUSTOMIZE_SRC): - GOPATH=$(GOPATH) $(GO) get -d sigs.k8s.io/kustomize/kustomize/... + # mkdir -p $(shell dirname $(KUSTOMIZE_SRC)) + git clone $(KUSTOMIZE_SYLR_REPO) $(shell dirname $(KUSTOMIZE_SRC)) kustomize-git-reset: git -C "$(KUSTOMIZE_SRC)/.." remote add sylr $(KUSTOMIZE_SYLR_REPO) || true @@ -36,7 +38,7 @@ kustomize-git-reset: git -C "$(KUSTOMIZE_SRC)/.." rev-parse --verify kustomize-age || git -C "$(KUSTOMIZE_SRC)/.." checkout -b kustomize-age $(KUSTOMIZE_AGE_SUPPORT_COMMIT) git -C "$(KUSTOMIZE_SRC)/.." rev-parse --verify kustomize-age && git -C "$(KUSTOMIZE_SRC)/.." checkout kustomize-age && git -C "$(KUSTOMIZE_SRC)/.." reset --hard $(KUSTOMIZE_AGE_SUPPORT_COMMIT) -age-binaries: $(AGE_SRC) age-git-reset +age-binaries: age-git-reset $(AGE_SRC) cd $(AGE_SRC); \ for platform in $(PLATFORMS); do \ GOOS=$$(cut -d / -f1 <<<$$platform); \ @@ -44,7 +46,6 @@ age-binaries: $(AGE_SRC) age-git-reset OUTPUT=$$(basename $$PWD)-$$GOOS-$$GOARCH-$$(git rev-parse --short=8 HEAD); \ test "$$GOOS" == "windows" && OUTPUT=$${OUTPUT}.exe; \ GOOS=$$GOOS GOARCH=$$GOARCH go build -ldflags="-s -w" -trimpath -o $$OUTPUT ./cmd/age; \ - upx $$OUTPUT; \ cp $$OUTPUT $(CURDIR)/bin; \ done @@ -56,6 +57,5 @@ kustomize-binaries: $(KUSTOMIZE_SRC) kustomize-git-reset OUTPUT=$$(basename $$PWD)-$$GOOS-$$GOARCH-$$(git rev-parse --short=8 HEAD); \ test "$$GOOS" == "windows" && OUTPUT=$${OUTPUT}.exe; \ GOOS=$$GOOS GOARCH=$$GOARCH go build -ldflags="-s -w" -trimpath -o $$OUTPUT .; \ - upx $$OUTPUT; \ cp $$OUTPUT $(CURDIR)/bin; \ done