From 46ee59538914dc2859f0da6b32e2d062d0a01b10 Mon Sep 17 00:00:00 2001 From: laggardkernel Date: Tue, 25 May 2021 17:29:38 +0800 Subject: [PATCH] fix: short commit sha and typo fix in Makefile (#1411) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 306854ce..1feaeb35 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,10 @@ MODULE = $(shell env GO111MODULE=on $(GO) list -m) DATE ?= $(shell date +%FT%T%z) VERSION ?= $(shell git describe --tags --always --match=v* 2> /dev/null || \ cat $(CURDIR)/.version 2> /dev/null || echo v0) -VERSION_HASH = $(shell git rev-parse HEAD) +VERSION_HASH = $(shell git rev-parse --short HEAD) BRANCH = $(shell git rev-parse --abbrev-ref HEAD) -LDFLAGS += -X "$(MODULE)/varsion.Version=$(VERSION)" -X "$(MODULE)/varsion.CommitSHA=$(VERSION_HASH)" +LDFLAGS += -X "$(MODULE)/version.Version=$(VERSION)" -X "$(MODULE)/version.CommitSHA=$(VERSION_HASH)" # tools $(BIN):