Skip to content

Commit

Permalink
Release zips include both binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Jun 14, 2022
1 parent 364cbe8 commit 1442fa0
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
Expand Down

0 comments on commit 1442fa0

Please sign in to comment.