listmonk/Makefile

17 lines
360 B
Makefile
Raw Normal View History

2018-10-25 13:51:47 +00:00
BIN := listmonk
HASH := $(shell git rev-parse --short HEAD)
COMMIT_DATE := $(shell git show -s --format=%ci ${HASH})
BUILD_DATE := $(shell date '+%Y-%m-%d %H:%M:%S')
VERSION := ${HASH} (${COMMIT_DATE})
build:
go build -o ${BIN} -ldflags="-X 'main.buildVersion=${VERSION}' -X 'main.buildDate=${BUILD_DATE}'"
test:
go test
clean:
go clean
- rm -f ${BIN}