From 4bc4daa68fb77b50571dee030ac82ece435f34f3 Mon Sep 17 00:00:00 2001 From: whorfin Date: Sat, 23 Oct 2021 18:27:19 -0700 Subject: [PATCH] Improve git-vs-tarball detection (#1423) * Extract version from directory name if .git dir is missing * Avoid using shell * Remove .gitinfo build from pipeline * Fix git-detecting rule to be robust in presence of setup-git --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 80cf6064..59e1da6d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GO_VERSION=$(shell grep "^go " go.mod | cut -f 2 -d ' ') NODE_VERSION=$(shell cat .nvmrc) -ifneq ("$(wildcard .git)","") +ifneq ("$(wildcard .git/HEAD)","") GIT_SHA=$(shell git rev-parse --short HEAD) GIT_TAG=$(shell git describe --tags `git rev-list --tags --max-count=1`) else