2023-01-06 15:34:55 +00:00
|
|
|
# This is what we want to name the binary output
|
2022-01-21 14:40:44 +00:00
|
|
|
BINARY=gime
|
2022-01-19 21:02:23 +00:00
|
|
|
|
2022-01-21 14:40:44 +00:00
|
|
|
# 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
|
2022-01-19 21:02:23 +00:00
|
|
|
gime:
|
2022-01-21 14:40:44 +00:00
|
|
|
go build ${LDFLAGS} -o build/${BINARY}
|
2022-01-19 21:02:23 +00:00
|
|
|
|
2023-01-06 15:34:55 +00:00
|
|
|
runui:
|
|
|
|
cd build && ./gime ui
|
|
|
|
|
2022-01-19 21:02:23 +00:00
|
|
|
clean:
|
|
|
|
rm build/*
|