hasshelper/Makefile
2022-05-07 00:56:37 -05:00

18 lines
368 B
Makefile

BIN_NAME=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_NAME}
test:
go test ./... -ldflags ${LDFLAGS}
clean:
rm -f ${BIN_NAME}*