19 lines
418 B
Makefile
19 lines
418 B
Makefile
BIN_NAME=hasshelper
|
|
PACKAGE_NAME=git.bloy.org/mike/hasshelper
|
|
GIT_DESCRIBE=$(shell git describe --always --long --dirty)
|
|
GIT_SEMVER=$(shell go run github.com/mdomke/git-semver)
|
|
LDFLAGS="-X main.gitDescribe=${GIT_DESCRIBE} -X main.gitVersion=${GIT_SEMVER}"
|
|
|
|
default: all
|
|
|
|
all: test build
|
|
|
|
build:
|
|
go build -ldflags ${LDFLAGS} -o bin/${BIN_NAME}
|
|
|
|
test:
|
|
go test ./... -ldflags ${LDFLAGS}
|
|
|
|
clean:
|
|
rm -rf bin/${BIN_NAME}
|