Skip to content

Commit

Permalink
Add a Makefile to streamline release creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Jan 15, 2019
1 parent 89398d2 commit 998de3c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
gostamp
*~
.idea
binaries/
release/
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
VERSION=0.2

.PHONY: clean binaries release

clean:
rm -rf binaries/ release/ gostamp

binaries: binaries/osx_x86_64/gostamp binaries/windows_x86_64/gostamp.exe binaries/linux_x86_64/gostamp binaries/osx_x86_32/gostamp binaries/windows_x86_32/gostamp.exe binaries/linux_x86_32/gostamp

binaries/osx_x86_64/gostamp:
GOOS=darwin GOARCH=amd64 go build -o binaries/osx_x86_64/gostamp

binaries/osx_x86_32/gostamp:
GOOS=darwin GOARCH=386 go build -o binaries/osx_x86_32/gostamp

binaries/windows_x86_64/gostamp.exe:
GOOS=windows GOARCH=amd64 go build -o binaries/windows_x86_64/gostamp.exe

binaries/windows_x86_32/gostamp.exe:
GOOS=windows GOARCH=386 go build -o binaries/windows_x86_32/gostamp.exe

binaries/linux_x86_64/gostamp:
GOOS=linux GOARCH=amd64 go build -o binaries/linux_x86_64/gostamp

binaries/linux_x86_32/gostamp:
GOOS=linux GOARCH=386 go build -o binaries/linux_x86_32/gostamp

binaries/linux_arm64/gostamp:
GOOS=linux GOARCH=arm64 go build -o binaries/linux_arm64/gostamp

release: binaries
mkdir -p release/ ;
cd binaries/; for i in *; do cd $$i/ ; zip -r -D ../../release/gostamp_$(VERSION)_$$i.zip *; cd ../ ; done

0 comments on commit 998de3c

Please sign in to comment.