From 24876aa47b57e931e1988e20c7dbbeab8b59372a Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Tue, 29 Jan 2019 21:00:06 -0800 Subject: [PATCH] Merge PR #3441: Small fixes for Makefile - Remove --long from git describe. Appending commit info on tagged revisions is redundant. - $(subst v,,$(shell git describe --tags --long)) was removing any occurrence of 'v'. Rather we want to remove only the 'v' prefix from tags. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 10d347069b..423179a0a4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PACKAGES_NOSIMULATION=$(shell go list ./... | grep -v '/simulation') PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') -VERSION := $(subst v,,$(shell git describe --tags --long)) +VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//') COMMIT := $(shell git log -1 --format='%H') BUILD_TAGS = netgo CAT := $(if $(filter $(OS),Windows_NT),type,cat)