]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dist: drop repetition in filenames, default to release tag
authorAndrew Gerrand <adg@golang.org>
Thu, 26 Apr 2012 20:25:53 +0000 (13:25 -0700)
committerAndrew Gerrand <adg@golang.org>
Thu, 26 Apr 2012 20:25:53 +0000 (13:25 -0700)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6117066

misc/dist/bindist.go

index b623449a4ee517a5233b1c88ebccd7d66306baa5..891397635b38329041451bcd23b578923518fb88 100644 (file)
@@ -29,7 +29,7 @@ import (
 )
 
 var (
-       tag      = flag.String("tag", "weekly", "mercurial tag to check out")
+       tag      = flag.String("tag", "release", "mercurial tag to check out")
        repo     = flag.String("repo", "https://code.google.com/p/go", "repo URL")
        verbose  = flag.Bool("v", false, "verbose output")
        upload   = flag.Bool("upload", true, "upload resulting files to Google Code")
@@ -209,14 +209,20 @@ func (b *Build) Do() error {
        }
 
        // Create packages.
-       base := fmt.Sprintf("go.%s.%s-%s", version, b.OS, b.Arch)
+       base := fmt.Sprintf("%s.%s-%s", version, b.OS, b.Arch)
+       if !strings.HasPrefix(base, "go") {
+               base = "go." + base
+       }
        var targs []string
        switch b.OS {
        case "linux", "freebsd", "":
                // build tarball
                targ := base
                if b.Source {
-                       targ = fmt.Sprintf("go.%s.src", version)
+                       targ = fmt.Sprintf("%s.src", version)
+                       if !strings.HasPrefix(targ, "go") {
+                               targ = "go." + targ
+                       }
                }
                targ += ".tar.gz"
                err = makeTar(targ, work)