diff --git a/Makefile b/Makefile index 782b414bb35d32a9b4d24f897438dee67afd30a6..ee9793c35d6ef36ead1e0e4025530375622ab114 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ VERSION_TAG := $(shell git describe --tags --always) VERSION_VERSION := $(shell git log --date=iso --pretty=format:"%cd" -1) $(VERSION_TAG) VERSION_COMPILE := $(shell date +"%F %T %z") by $(shell go version) VERSION_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -VERSION_GIT_DIRTY := $(shell git diff --no-ext-diff 2>/dev/null | wc -l | awk '{print 1}') +VERSION_GIT_DIRTY := $(shell git diff --no-ext-diff 2>/dev/null | wc -l | awk '{print $1}') VERSION_DEV_PATH:= $(shell pwd) LDFLAGS=-ldflags="-s -w -X 'github.com/XiaoMi/soar/common.Version=$(VERSION_VERSION)' -X 'github.com/XiaoMi/soar/common.Compile=$(VERSION_COMPILE)' -X 'github.com/XiaoMi/soar/common.Branch=$(VERSION_BRANCH)' -X github.com/XiaoMi/soar/common.GitDirty=$(VERSION_GIT_DIRTY) -X github.com/XiaoMi/soar/common.DevPath=$(VERSION_DEV_PATH)"