From 710b105f383db7c92a8195a1d31bfd3b02f1e87d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 30 Oct 2020 13:03:46 -0700 Subject: [PATCH] version: use -g as the "other" suffix, so that `git show` works. Fixes #880. Signed-off-by: David Anderson --- version/mkversion.sh | 2 +- version/mkversion_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/version/mkversion.sh b/version/mkversion.sh index a5768c040..84772bc20 100755 --- a/version/mkversion.sh +++ b/version/mkversion.sh @@ -72,7 +72,7 @@ fi # used and Go toolchain version). if [ -n "$other" ]; then other="$(echo $other | cut -c1-9)" - other="-o${other}" + other="-g${other}" fi # Validate that the version data makes sense. Rules: diff --git a/version/mkversion_test.go b/version/mkversion_test.go index 00560bbf1..e209b4756 100644 --- a/version/mkversion_test.go +++ b/version/mkversion_test.go @@ -47,7 +47,7 @@ func TestMkversion(t *testing.T) { {"v0.98-123-gabcdef", "", true, "0.0.0-tabcdef", "0.0.0", xcode("0.0.0", "100.0.0")}, {"v1.0.0-37-gabcdef", "", true, "0.0.0-tabcdef", "0.0.0", xcode("0.0.0", "100.0.0")}, - {"v1.1.0-129-gabcdef", "0123456789abcdef0123456789abcdef", true, "1.1.1129-tabcdef-o012345678", "1.1.1129", xcode("1.1.1129", "101.1.1129")}, + {"v1.1.0-129-gabcdef", "0123456789abcdef0123456789abcdef", true, "1.1.1129-tabcdef-g012345678", "1.1.1129", xcode("1.1.1129", "101.1.1129")}, {"v0.99.5-0-gabcdef", "", false, "", "", ""}, // unstable, patch not allowed {"v0.99.5-123-gabcdef", "", false, "", "", ""}, // unstable, patch not allowed {"v1-gabcdef", "", false, "", "", ""}, // bad semver