public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] GIT-VERSION-GEN: Use standard versioning suffix
@ 2025-09-05 12:14 Jonas Rebmann
  2025-09-05 12:19 ` brian m. carlson
  2025-09-05 12:32 ` Kristoffer Haugsbakk
  0 siblings, 2 replies; 5+ messages in thread
From: Jonas Rebmann @ 2025-09-05 12:14 UTC (permalink / raw)
  To: git; +Cc: gitster, Patrick Steinhardt, kernel, Jonas Rebmann

In snapshot builds of git, git-version uses a modified variant of the
git-describe output, e.g. 2.51.0.178.g2462961280 instead of
2.51.0-178-g2462961280 for seemingly historical reasons.

This is not semver compliant which makes the output harder to parse in
tooling such as b4, which currently errors out when using a snapshot
build of git.

For snapshot builds, use as version string the unmodified git-describe
output with only the leading v stripped from the tag.

Fixes: 5c7d3c9507f7 ("Allow building of RPM from interim snapshot.")
Signed-off-by: Jonas Rebmann <jre@pengutronix•de>
---
 GIT-VERSION-GEN | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index b16db85e77..99e04588f3 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -52,7 +52,7 @@ then
 		*$LF*) (exit 1) ;;
 		esac
 	then
-		VN=$(echo "$VN" | sed -e 's/-/./g');
+		: # use VN as set by git describe
 	else
 		VN="$DEF_VER"
 	fi

---
base-commit: 2462961280690837670d997bde64bd4ebf8ae66d
change-id: 20250905-semver-2e9a9a9c77ef

Best regards,
--  
Jonas Rebmann <jre@pengutronix•de>


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-09-05 15:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05 12:14 [PATCH] GIT-VERSION-GEN: Use standard versioning suffix Jonas Rebmann
2025-09-05 12:19 ` brian m. carlson
2025-09-05 13:43   ` Jonas Rebmann
2025-09-05 15:19   ` Junio C Hamano
2025-09-05 12:32 ` Kristoffer Haugsbakk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox