mirror of
https://github.com/knadh/listmonk.git
synced 2024-11-10 17:13:04 +08:00
16 lines
360 B
Makefile
16 lines
360 B
Makefile
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}
|