12 lines
324 B
Makefile
12 lines
324 B
Makefile
|
.PHONY: build
|
||
|
|
||
|
GIT_COMMIT := $(shell git rev-parse HEAD)
|
||
|
BUILD_DATE := $(shell date -u +.%Y%m%d.%H%M%S)
|
||
|
CGO_ENABLED=0
|
||
|
|
||
|
default:
|
||
|
CGO_ENABLED=$(CGO_ENABLED) go build -o out/engibot -trimpath -ldflags "-s -w -X main.gitCommit=$(GIT_COMMIT)" main.go
|
||
|
|
||
|
debug:
|
||
|
go build -o out/ -ldflags "-X main.gitCommit=$(GIT_COMMIT)" main.go
|