From: Andrew Gerrand Date: Sun, 1 Jun 2014 22:48:20 +0000 (+1000) Subject: cmd/dist: only use beta tag in version string for the exact revision X-Git-Tag: go1.3rc1~9 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=300f3c4913188c1c40b8ff91235e50d886c0d7ed;p=gostls13.git cmd/dist: only use beta tag in version string for the exact revision Right now, any revision on the default branch after go1.3beta2 is described by "go verson" as go1.3beta2 plus some revision. That's OK for now, but once go1.3 is released, that will seem wrong. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/98650046 --- diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index 59852b0120..6884e0aae9 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -290,9 +290,8 @@ findgoversion(void) p = tags.p[i]; if(streq(p, "+")) nrev++; - // NOTE: Can reenable the /* */ code when we want to - // start reporting versions named 'weekly' again. - if(/*hasprefix(p, "weekly.") ||*/ hasprefix(p, "go")) { + // Only show the beta tag for the exact revision. + if(hasprefix(p, "go") && (!contains(p, "beta") || nrev == 0)) { tag = xstrdup(p); // If this tag matches the current checkout // exactly (no "+" yet), don't show extra