]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix install target name for versioned binaries
authorRuss Cox <rsc@golang.org>
Thu, 9 Aug 2018 20:36:48 +0000 (16:36 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 10 Aug 2018 00:47:25 +0000 (00:47 +0000)
commit9f5336d8d055e5768b5316bf6d32b1a5a705702e
treec27f3b448ee77b5facd2d97c01dc5cb72e0bcf03
parentcb7d0efc2380b1231bc858058ac9f0032a8002ea
cmd/go: fix install target name for versioned binaries

For a package in the module root, using the containing directory name
might mean the directory in the module cache, in which case the
executable has a final @v1.2.3 in it, which is no good. Fix that.

While we're here, change go install example.com/cmd/foo/v2 to
install foo instead of the less useful "v2".

Fixes #24667.
Fixes #26869.

Change-Id: Ie40ca1bc9e27955441f1cdb7abd3a1f69034c9f5
Reviewed-on: https://go-review.googlesource.com/128900
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/mod/rsc.io_fortune_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/mod/rsc.io_fortune_v2_v2.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_install.txt [deleted file]
src/cmd/go/testdata/script/mod_install_versioned.txt [new file with mode: 0644]