From b9c2ef68f92236912a36516d8748ec2aeed1868c Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sun, 4 Sep 2022 13:10:07 +0100 Subject: [PATCH] Use `git describe --tags` to include non-annotated tags By default, `git describe` uses only annotated tags. Since some may not be annotated (like v1.10) this causes some scripts to pick a confusing version identifier. This patch fixes the issue by passing `--tags`, which means all tags will be considered. --- Makefile | 2 +- test/cover.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 78f6375..7fa0605 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ifndef VERSION - VERSION = `git describe --always --long --dirty` + VERSION = `git describe --always --long --dirty --tags` endif # https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal diff --git a/test/cover.sh b/test/cover.sh index c212c24..9479f49 100755 --- a/test/cover.sh +++ b/test/cover.sh @@ -56,7 +56,7 @@ go run "${UTILDIR}/coverhtml/coverhtml.go" \ -input="$COVER_DIR/all.out" -strip=3 \ -output="$COVER_DIR/coverage.html" \ -title="chasquid coverage report" \ - -notes="Generated at commit $(git describe --always --dirty) ($(git log -1 --format=%ci))" + -notes="Generated at commit $(git describe --always --dirty --tags) ($(git log -1 --format=%ci))" echo echo