Skip to content

Commit

Permalink
Merge pull request #11 from h3poteto/makefile
Browse files Browse the repository at this point in the history
Add makefile to build package
  • Loading branch information
h3poteto committed Feb 16, 2019
2 parents 8fbcd7b + 01dc98a commit e7879d8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor
vendor
packages
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: all glide build

OUTPUT = kube-job
BUILD_CMD = go build -a -tags netgo -installsuffix netgo --ldflags '-extldflags "-static"'
VERSION = v1.0.0

all: mac linux windows

glide: glide.lock
glide install

mac: glide
GOOS=darwin GOARCH=amd64 $(BUILD_CMD) -o $(OUTPUT)
zip packages/$(OUTPUT)_${VERSION}_darwin_amd64.zip $(OUTPUT)

linux: glide
GOOS=linux GOARCH=amd64 $(BUILD_CMD) -o $(OUTPUT)
zip packages/$(OUTPUT)_${VERSION}_linux_amd64.zip $(OUTPUT)

windows: glide
GOOS=windows GOARCH=amd64 $(BUILD_CMD) -o $(OUTPUT).exe
zip packages/$(OUTPUT)_${VERSION}_windows_amd64.zip $(OUTPUT).exe
2 changes: 0 additions & 2 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added packages/.gitkeep
Empty file.

0 comments on commit e7879d8

Please sign in to comment.