version: use -g as the "other" suffix, so that `git show` works.

Fixes #880.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/868/head
David Anderson 4 years ago committed by Dave Anderson
parent f3aa08de76
commit 710b105f38

@ -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:

@ -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

Loading…
Cancel
Save