breaktime/Makefile

22 lines
536 B
Makefile
Raw Normal View History

2023-03-31 14:51:41 +00:00
# This is what we want to name the binary output
BINARY=breaktime
# These are the values we want to pass for VERSION and BUILD
# git tag 1.0.1
# git commit -am "One more change after the tags"
VERSION=`git describe --tags`
BUILD=`date +%FT%T%z`
# Setup the -ldflags option for go build here, interpolate the variable values
LDFLAGS=-ldflags "-w -s -X cmd.Version=${VERSION} -X cmd.Build=${BUILD}"
# Builds the project
breaktime:
go build ${LDFLAGS} -o build/${BINARY}
2023-11-28 14:13:06 +00:00
install:
mv build/${BINARY} ${GOPATH}/bin
2023-03-31 14:51:41 +00:00
clean:
rm build/*