Commit 029d62f5 authored by Andrew Gerrand's avatar Andrew Gerrand

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

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6117066
parent d8443d2e
...@@ -29,7 +29,7 @@ import ( ...@@ -29,7 +29,7 @@ import (
) )
var ( 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") repo = flag.String("repo", "https://code.google.com/p/go", "repo URL")
verbose = flag.Bool("v", false, "verbose output") verbose = flag.Bool("v", false, "verbose output")
upload = flag.Bool("upload", true, "upload resulting files to Google Code") upload = flag.Bool("upload", true, "upload resulting files to Google Code")
...@@ -209,14 +209,20 @@ func (b *Build) Do() error { ...@@ -209,14 +209,20 @@ func (b *Build) Do() error {
} }
// Create packages. // 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 var targs []string
switch b.OS { switch b.OS {
case "linux", "freebsd", "": case "linux", "freebsd", "":
// build tarball // build tarball
targ := base targ := base
if b.Source { 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" targ += ".tar.gz"
err = makeTar(targ, work) err = makeTar(targ, work)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment