Skip to content

Commit

Permalink
cmd/release: remove -tarball support, no longer needed
Browse files Browse the repository at this point in the history
It was only used by security releases.

For golang/go#51797.

Change-Id: I241cfe23797f21daded434b1baa91386097bf8a0
Reviewed-on: https://go-review.googlesource.com/c/build/+/394362
Trust: Heschi Kreinick <[email protected]>
Run-TryBot: Heschi Kreinick <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Heschi Kreinick <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
heschi authored and gopherbot committed Mar 22, 2022
1 parent 9adcb24 commit 746a6d3
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions cmd/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ var (

stagingDir = flag.String("staging_dir", "", "If specified, use this as the staging directory for untested release artifacts. Default is the system temporary directory.")

rev = flag.String("rev", "", "Go revision to build, alternative to -tarball")
tarball = flag.String("tarball", "", "Go tree tarball to build, alternative to -rev")
rev = flag.String("rev", "", "Go revision to build")
version = flag.String("version", "", "Version string (go1.5.2)")
user = flag.String("user", username(), "coordinator username, appended to 'user-'")
skipTests = flag.Bool("skip_tests", false, "skip tests; run make.bash but not all.bash (only use if sufficient testing was done elsewhere)")
Expand All @@ -70,8 +69,8 @@ func main() {
return
}

if (*rev == "" && *tarball == "") || (*rev != "" && *tarball != "") {
log.Fatal("must specify one of -rev or -tarball")
if *rev == "" {
log.Fatal("must specify -rev")
}
if *version == "" {
log.Fatal(`must specify -version flag (such as "go1.12" or "go1.13beta1")`)
Expand Down Expand Up @@ -361,23 +360,11 @@ func (b *Build) make() error {
goPath = "gopath"
go14 = "go1.4"
)
if *tarball != "" {
tarFile, err := os.Open(*tarball)
if err != nil {
b.logf("failed to open tarball %q: %v", *tarball, err)
return err
}
if err := client.PutTar(ctx, tarFile, goDir); err != nil {
b.logf("failed to put tarball %q into dir %q: %v", *tarball, goDir, err)
return err
}
tarFile.Close()
} else {
tar := "https://go.googlesource.com/go/+archive/" + *rev + ".tar.gz"
if err := client.PutTarFromURL(ctx, tar, goDir); err != nil {
b.logf("failed to put tarball %q into dir %q: %v", tar, goDir, err)
return err
}

tar := "https://go.googlesource.com/go/+archive/" + *rev + ".tar.gz"
if err := client.PutTarFromURL(ctx, tar, goDir); err != nil {
b.logf("failed to put tarball %q into dir %q: %v", tar, goDir, err)
return err
}

if u := bc.GoBootstrapURL(buildEnv); u != "" && !b.Source {
Expand Down

0 comments on commit 746a6d3

Please sign in to comment.