diff options
author | Andrew Gerrand <adg@golang.org> | 2014-06-02 08:48:20 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2014-06-02 08:48:20 +1000 |
commit | 300f3c4913188c1c40b8ff91235e50d886c0d7ed (patch) | |
tree | 688470a5b872347b842a1e17fe32d2a5b5372ba5 | |
parent | 189a6494ee5912f7add466bff9e7afbe960a6a2e (diff) | |
download | go-300f3c4913188c1c40b8ff91235e50d886c0d7ed.tar.gz go-300f3c4913188c1c40b8ff91235e50d886c0d7ed.zip |
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
-rw-r--r-- | src/cmd/dist/build.c | 5 |
1 files changed, 2 insertions, 3 deletions
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 |