Last active
April 19, 2016 16:24
-
-
Save saml/ba329e28a3dce7c957746355618d7d7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: clean all test | |
VERSION ?= $(shell git describe --tags --abbrev=0) | |
REVISION ?= $(shell git rev-parse HEAD) | |
BUILDDATE ?= $(shell date) | |
IMPORTNAME = github.com/saml/yolo | |
all: bin/yolo bin/yolo-webap | |
bin/yolo: *.go pkg1/*.go pkg2/*.go cmd/yolo/*.go test | |
wgo build -o $@ -ldflags '-X "$(IMPORTNAME).appVersion=$(VERSION)" -X "$(IMPORTNAME).appRevision=$(REVISION)" -X "$(IMPORTNAME).appBuildDate=$(BUILDDATE)"' ./cmd/yolo | |
bin/yolo-webapp: *.go pkg1/*.go pkg3/*.go cmd/yolo-webapp/*.go test | |
wgo build -o $@ -ldflags '-X "$(IMPORTNAME).appVersion=$(VERSION)" -X "$(IMPORTNAME).appRevision=$(REVISION)" -X "$(IMPORTNAME).appBuildDate=$(BUILDDATE)"' ./cmd/yolo-webapp | |
test: | |
wgo fmt . ./pkg1 ./pkg2 ./pkg3 ./cmd/... | |
wgo vet . ./pkg1 ./pkg2 ./pkg3 ./cmd/... | |
golint . | |
golint ./pkg1 | |
golint ./pkg2 | |
golint ./pkg3 | |
golint ./cmd/... | |
wgo test -cover . ./pkg1 ./pkg2 ./pkg3 ./cmd/... | |
clean: | |
rm -rf bin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment