Skip to content

Commit

Permalink
Tune Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
  • Loading branch information
sylr committed Jul 10, 2021
1 parent ebb2bbd commit 1174dc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ kustomize-binary: $(KUSTOMIZE_SRC) kustomize-git-reset
for platform in $(PLATFORMS); do \
GOOS=$$(cut -d / -f1 <<<$$platform); \
GOARCH=$$(cut -d / -f2 <<<$$platform); \
OUTPUT=$$(basename $$PWD)-$$GOOS-$$GOARCH-$$(git rev-parse --short=8 HEAD); \
OUTPUT=$$(basename $$PWD)-$$(git describe --tags | cut -d '/' -f2)-$$GOOS-$$GOARCH; \
test "$$GOOS" == "windows" && OUTPUT=$${OUTPUT}.exe; \
GOOS=$$GOOS GOARCH=$$GOARCH go build -ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=$(shell git -C "$(KUSTOMIZE_SRC)/.." describe --tags | cut -d '/' -f2) -X sigs.k8s.io/kustomize/api/provenance.gitCommit=$(shell git -C "$(KUSTOMIZE_SRC)/.." rev-parse HEAD) -X sigs.k8s.io/kustomize/api/provenance.buildDate=$(shell date -u +%FT%TZ)" -trimpath -o $$OUTPUT .; \
GOOS=$$GOOS GOARCH=$$GOARCH go build -ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=$$(git describe --tags | cut -d '/' -f2) -X sigs.k8s.io/kustomize/api/provenance.gitCommit=$$(git rev-parse HEAD) -X sigs.k8s.io/kustomize/api/provenance.buildDate=$(shell date -u +%FT%TZ)" -trimpath -o $$OUTPUT .; \
cp $$OUTPUT $(CURDIR)/bin; \
done

0 comments on commit 1174dc2

Please sign in to comment.