]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: only use beta tag in version string for the exact revision
authorAndrew Gerrand <adg@golang.org>
Sun, 1 Jun 2014 22:48:20 +0000 (08:48 +1000)
committerAndrew Gerrand <adg@golang.org>
Sun, 1 Jun 2014 22:48:20 +0000 (08:48 +1000)
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

src/cmd/dist/build.c

index 59852b0120a66da06cadcc3f1259eb7b0ae1d89f..6884e0aae9ba947ce413e324686046f6a85b2d2c 100644 (file)
@@ -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