1
0
mirror of https://github.com/golang/go synced 2024-11-25 04:57:56 -07:00

misc/dist: drop repetition in filenames, default to release tag

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6117066
This commit is contained in:
Andrew Gerrand 2012-04-26 13:25:53 -07:00
parent d8443d2e41
commit 029d62f5c0

12
misc/dist/bindist.go vendored
View 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)