From 2f24ab339736315659f26699ab50aa2982d7e890 Mon Sep 17 00:00:00 2001 From: Adin Scannell Date: Tue, 19 May 2020 21:01:23 -0700 Subject: [PATCH] Allow arbitrary Go commands for go_mod.sh. --- tools/{go_mod.sh => go.sh} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename tools/{go_mod.sh => go.sh} (87%) diff --git a/tools/go_mod.sh b/tools/go.sh similarity index 87% rename from tools/go_mod.sh rename to tools/go.sh index 84b779d6d..b10ad18da 100755 --- a/tools/go_mod.sh +++ b/tools/go.sh @@ -17,13 +17,13 @@ set -eo pipefail # Build the :gopath target. -bazel build //:gopath +make build TARGETS=":gopath" declare -r gopathdir="bazel-bin/gopath/src/gvisor.dev/gvisor/" # Copy go.mod and execute the command. cp -a go.mod go.sum "${gopathdir}" -(cd "${gopathdir}" && go mod "$@") +(cd "${gopathdir}" && go "$@") cp -a "${gopathdir}/go.mod" "${gopathdir}/go.sum" . # Cleanup the WORKSPACE file. -bazel run //:gazelle -- update-repos -from_file=go.mod +make run TARGETS=":gazelle" ARGS="update-repos -from_file=go.mod"