Skip to content

Commit

Permalink
skip gzip compression, let's see what gets built
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcz committed Apr 24, 2022
1 parent bffbe45 commit 60a6917
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ precommit: clean generate format lint test compile

.PHONY: commit
commit: clean test cross-compile
rm target/s3backup
ls -lha target/

.PHONY: clean
Expand Down Expand Up @@ -48,22 +47,21 @@ endif

.PHONY: compile
compile: target
rm -f target/s3backup
go build -ldflags "${LDFLAGS}" -o target ./cmd/...

pack = gzip -c < target/s3backup > target/s3backup-${1}.gz

.PHONY: cross-compile
cross-compile:
GOOS=linux GOARCH=amd64 $(MAKE) compile
$(call pack,linux-amd64)
#$(call pack,linux-amd64)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(MAKE) compile
$(call pack,linux-amd64-nocgo)
#$(call pack,linux-amd64-nocgo)
GOOS=darwin GOARCH=amd64 $(MAKE) compile
$(call pack,osx-amd64)
#$(call pack,osx-amd64)
GOOS=darwin GOARCH=arm64 $(MAKE) compile
$(call pack,osx-arm64)
#$(call pack,osx-arm64)
GOOS=windows GOARCH=amd64 $(MAKE) compile
$(call pack,win-amd64.exe)
#$(call pack,win-amd64.exe)
GOOS=windows GOARCH=386 $(MAKE) compile
$(call pack,win-386.exe)
#$(call pack,win-386.exe)

0 comments on commit 60a6917

Please sign in to comment.