Skip to content

Commit

Permalink
fix make commit
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Jan 2, 2023
1 parent 7a80c5d commit dc87f79
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ ARCH=
NAME=ncp
BINDIR=bin
PROFIX=
COMMIT=$(shell git rev-parse HEAD)
VERSION=$(shell git describe --tags || echo "unknown version")
BUILDTIME=$(shell date)
GOBUILD=CGO_ENABLED=0 go build -trimpath \
-ldflags '-X "sb.im/ncp/constant.Version=$(VERSION)" \
-X "sb.im/ncp/constant.BuildTime=$(BUILDTIME)"'
BUILDTIME=$(shell date +%FT%T%z)
LD_FLAGS='\
-X "sb.im/ncp/constant.Commit=$(COMMIT)" \
-X "sb.im/ncp/constant.Version=$(VERSION)" \
-X "sb.im/ncp/constant.BuildTime=$(BUILDTIME)" \
'
GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags $(LD_FLAGS)

PLATFORM_LIST = \
darwin-amd64 \
Expand Down

0 comments on commit dc87f79

Please sign in to comment.