Makefile update

This commit is contained in:
Mike Bloy 2022-05-07 00:56:37 -05:00
parent 9f7649049d
commit fa041e395a

View File

@ -1,5 +1,4 @@
BIN_NAME=hasshelper BIN_NAME=hasshelper
PACKAGE_NAME=git.bloy.org/mike/hasshelper
GIT_DESCRIBE=$(shell git describe --always --long --dirty) GIT_DESCRIBE=$(shell git describe --always --long --dirty)
GIT_SEMVER=$(shell go run github.com/mdomke/git-semver) GIT_SEMVER=$(shell go run github.com/mdomke/git-semver)
LDFLAGS="-X main.gitDescribe=${GIT_DESCRIBE} -X main.gitVersion=${GIT_SEMVER}" LDFLAGS="-X main.gitDescribe=${GIT_DESCRIBE} -X main.gitVersion=${GIT_SEMVER}"
@ -9,10 +8,10 @@ default: all
all: test build all: test build
build: build:
go build -ldflags ${LDFLAGS} -o bin/${BIN_NAME} go build -ldflags ${LDFLAGS} -o ${BIN_NAME}
test: test:
go test ./... -ldflags ${LDFLAGS} go test ./... -ldflags ${LDFLAGS}
clean: clean:
rm -rf bin/${BIN_NAME} rm -f ${BIN_NAME}*