Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from buildkite/add-makefile
Browse files Browse the repository at this point in the history
Add a Makefile
  • Loading branch information
lox authored Nov 23, 2018
2 parents 2cc084a + 57d0a1e commit 84f6666
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/*
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
VERSION=$(shell git describe --tags --candidates=1 --dirty 2>/dev/null || echo "dev")
FLAGS=-s -w -X main.Version=$(VERSION)
SRC=$(shell find . -type f -name '*.go' -not -path "./vendor/*")

ecs-run-task: $(SRC)
go build -o ecs-run-task -ldflags="$(FLAGS)" -v .

.PHONY: test
test:
gofmt -s -l -w $(SRC)
go vet -v ./...
go test -race -v ./...

.PHONY: clean
clean:
rm -f ecs-run-task

.PHONY: release
release:
go get github.com/mitchellh/gox
gox -ldflags="$(FLAGS)" -output="build/{{.Dir}}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 windows/amd64" .

0 comments on commit 84f6666

Please sign in to comment.