summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-05-19 21:01:23 -0700
committerAdin Scannell <ascannell@google.com>2020-07-09 16:59:43 -0700
commit2f24ab339736315659f26699ab50aa2982d7e890 (patch)
treec03149a945681ea272bd8a9ccc9f1b3d575eeb65
parent60e19587cebc3cbc781088cc01080c71ad7900a0 (diff)
Allow arbitrary Go commands for go_mod.sh.
-rwxr-xr-xtools/go.sh (renamed from tools/go_mod.sh)6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/go_mod.sh b/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"