Skip to content

Commit

Permalink
Add Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Sep 8, 2016
1 parent 05a39ae commit 2042a5d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ Thumbs.db
*.DS_Store
*.swp
aws-rotate-key
aws-rotate-key.exe
release/
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
VERSION = 1.0.0
LDFLAGS = -ldflags '-s -w'
GOARCH = amd64
linux: export GOOS=linux
darwin: export GOOS=darwin
windows: export GOOS=windows

all: linux darwin windows

linux:
go build $(LDFLAGS)
mkdir -p release
rm -f release/aws-rotate-key-${VERSION}-${GOOS}_${GOARCH}.zip
zip release/aws-rotate-key-${VERSION}-${GOOS}_${GOARCH}.zip aws-rotate-key

darwin:
go build $(LDFLAGS)
mkdir -p release
rm -f release/aws-rotate-key-${VERSION}-${GOOS}_${GOARCH}.zip
zip release/aws-rotate-key-${VERSION}-${GOOS}_${GOARCH}.zip aws-rotate-key

windows:
go build $(LDFLAGS)
mkdir -p release
rm -f release/aws-rotate-key-${VERSION}-${GOOS}_${GOARCH}.zip
zip release/aws-rotate-key-${VERSION}-${GOOS}_${GOARCH}.zip aws-rotate-key.exe

.PHONY: clean
clean:
rm -rf release
rm -f aws-rotate-key aws-rotate-key.exe

0 comments on commit 2042a5d

Please sign in to comment.