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

Commit

Permalink
Add a Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lox committed Nov 23, 2018
1 parent 4bf0bd9 commit 57d0a1e
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 57d0a1e

Please sign in to comment.