chore: use short commit hash

This commit is contained in:
Paul Pan 2024-01-06 21:31:10 +08:00
parent 7d95c88063
commit 84a79c5460
Signed by: Paul
GPG Key ID: D639BDF5BA578AF4

View File

@ -3,7 +3,7 @@ GO := go
PKG_BASE := $(shell head -n 1 go.mod | awk '{print $$2}')
BUILD_TIME := $(shell date -u '+%Y%m%d-%I%M%S')
VERSION := $(shell cat VERSION)
GIT_COMMIT := $(shell git rev-parse HEAD)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
LDFLAGS += -X $(PKG_BASE)/cmd.BuildTime=$(BUILD_TIME)
LDFLAGS += -X $(PKG_BASE)/cmd.Version=$(VERSION)