2016-09-05 04:32:57 +02:00
|
|
|
.PHONY: build doc fmt lint run test vendor_clean vendor_get vendor_update vet
|
|
|
|
|
|
|
|
# Prepend our _vendor directory to the system GOPATH
|
|
|
|
# so that import path resolution will prioritize
|
|
|
|
# our third party snapshots.
|
2016-10-05 18:04:16 +02:00
|
|
|
VERSION := $(shell git rev-list --count master)
|
|
|
|
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}"
|
|
|
|
GOFILES := $(shell ls *.go | grep -v /vendor/)
|
2016-09-05 04:32:57 +02:00
|
|
|
BINARY=./bin/yay
|
|
|
|
|
|
|
|
default: build
|
|
|
|
|
2016-10-05 18:04:16 +02:00
|
|
|
install:
|
|
|
|
go install -v ${LDFLAGS} ${GO_FILES}
|
|
|
|
|
2016-09-05 04:32:57 +02:00
|
|
|
build:
|
2016-10-05 18:04:16 +02:00
|
|
|
go build -v -o ${BINARY} ${LDFLAGS} ${GO_FILES}
|
2016-09-05 04:32:57 +02:00
|
|
|
release:
|
|
|
|
go build -v -o ${BINARY} ./src/main.go
|
|
|
|
|
|
|
|
run: build
|
|
|
|
${BINARY}
|
|
|
|
|
|
|
|
clean:
|
|
|
|
go clean
|
|
|
|
|