Download: move cache location (#404)

* Download: move cache location

* beta3

* trying differnet repo

* avoid go breaking stuff
This commit is contained in:
Marwan Sulaiman
2018-08-04 14:29:30 -04:00
committed by Aaron Schlesinger
parent 6b766c3f72
commit 44625459fc
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -150,7 +150,7 @@ func getRepoDirName(repoURI, version string) string {
// getPackagePath returns the path to the module cache given the gopath and module name
func getPackagePath(gopath, module string) string {
return filepath.Join(gopath, "src", "mod", "cache", "download", module, "@v")
return filepath.Join(gopath, "pkg", "mod", "cache", "download", module, "@v")
}
func validGoBinary(name string) error {
+1 -1
View File
@@ -7,7 +7,7 @@ set -xeuo pipefail
go get github.com/golang/lint/golint
go get github.com/golang/dep/cmd/dep
GO_VERSION="go1.11beta2"
GO_VERSION="go1.11beta3"
GO_SOURCE=${GO_SOURCE:=$(go env GOPATH)/src/golang.org/x/go}
mkdir -p $(dirname $GO_SOURCE)
if [[ ! -d $GO_SOURCE ]]; then
+4 -4
View File
@@ -9,7 +9,7 @@ REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )/.."
# Use a version of Go that supports Go Modules
export GO111MODULES=on
GOMOD_CACHE=$(go env GOPATH)/src/mod
GOMOD_CACHE=$(go env GOPATH)/pkg/mod
GO_SOURCE=${GO_SOURCE:=$(go env GOPATH)/src/golang.org/x/go}
export GOROOT=${GO_SOURCE}
export PATH=${GO_SOURCE}/bin:${REPO_DIR}/bin:${PATH}
@@ -37,17 +37,17 @@ while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:3000)" != "200" ]
# Clone our test repo
TEST_SOURCE=${TMPDIR}go-depmgmt-testrepo
rm -fr ${TEST_SOURCE} 2> /dev/null || true
git clone https://github.com/carolynvs/go-depmgmt-testrepo.git ${TEST_SOURCE}
git clone https://github.com/athens-artifacts/happy-path.git ${TEST_SOURCE}
pushd ${TEST_SOURCE}
clearGoModCache
# Make sure that our test repo works without the GOPROXY first
unset GOPROXY
go run main.go
go run .
clearGoModCache
# Verify that the test works against the proxy
export GOPROXY=http://localhost:3000
go run main.go
go run .