Golang动态编译版本信息
Makefile BUILD=`date +%FT%T%z` COMMIT_SHA1=`git rev-parse HEAD` LDFLAGS=-ldflags "-X main.BUILD=${BUILD} -X main.COMMIT_SHA1=${COMMIT_SHA1}" # Builds the project all: app: go build ${LDFLAGS} -o ../bin/app/app github.com/winxxp/cmd/app main.go const ...阅读全文