From 1442fa0dc266efc46db0515b58930d68d11b1ee6 Mon Sep 17 00:00:00 2001 From: Jesse Peterson Date: Tue, 14 Jun 2022 11:36:09 -0700 Subject: [PATCH] Release zips include both binaries --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b8d372e..775bc87 100644 --- a/Makefile +++ b/Makefile @@ -20,20 +20,27 @@ $(CMDAPI): cmd/cmdapi $(LLORNE): cmd/llorne GOOS=$(word 2,$(subst -, ,$@)) GOARCH=$(word 3,$(subst -, ,$(subst .exe,,$@))) go build $(LDFLAGS) -o $@ ./$< -%-$(VERSION).zip: %.exe - rm -f $@ - zip $@ $< - -%-$(VERSION).zip: % - rm -f $@ - zip $@ $< +micro2nano-%-$(VERSION).zip: cmdapi-%.exe llorne-%.exe + rm -rf $(subst .zip,,$@) + mkdir $(subst .zip,,$@) + ln $^ $(subst .zip,,$@) + zip -r $@ $(subst .zip,,$@) + rm -rf $(subst .zip,,$@) + +micro2nano-%-$(VERSION).zip: cmdapi-% llorne-% + rm -rf $(subst .zip,,$@) + mkdir $(subst .zip,,$@) + ln $^ $(subst .zip,,$@) + zip -r $@ $(subst .zip,,$@) + rm -rf $(subst .zip,,$@) clean: rm -f cmdapi-* llorne-* release: \ - $(foreach bin,$(CMDAPI),$(subst .exe,,$(bin))-$(VERSION).zip) \ - $(foreach bin,$(LLORNE),$(subst .exe,,$(bin))-$(VERSION).zip) + micro2nano-darwin-amd64-$(VERSION).zip \ + micro2nano-darwin-arm64-$(VERSION).zip \ + micro2nano-linux-amd64-$(VERSION).zip test: go test -v -cover -race ./...