summaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-06-01 23:09:26 -0700
committerShentubot <shentubot@google.com>2019-06-01 23:10:43 -0700
commit216da0b733dbed9aad9b2ab92ac75bcb906fd7ee (patch)
tree2a0032e9b4e54f4d70b181d5e1e533eb7dfc5316 /BUILD
parent3577a4f6910f6b47c4f081577290e32e1f23c6b2 (diff)
Add tooling for Go-compatible branch.
The WORKSPACE go_repositories can be generated from a standard go.mod file. Add the necessary gazelle hooks to do so, and include a test that sanity checks there are no changes. This go.mod file will be used in a subsequent commit to generate a go gettable branch of the repository. This commit also adds a tools/go_branch.sh script, which given an existing go branch in the repository, will add an additional synthetic change to the branch bringing it up-to-date with HEAD. As a final step, a cloudbuild script is included, which can be used to automate the process for every change pushed to the repository. This may be used after an initial go branch is pushed, but this is manual process. PiperOrigin-RevId: 251095016
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD7
1 files changed, 7 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index 391791ca9..6d5e800ca 100644
--- a/BUILD
+++ b/BUILD
@@ -1,6 +1,7 @@
package(licenses = ["notice"]) # Apache 2.0
load("@io_bazel_rules_go//go:def.bzl", "go_path")
+load("@bazel_gazelle//:def.bzl", "gazelle")
# The sandbox filegroup is used for sandbox-internal dependencies.
package_group(
@@ -22,3 +23,9 @@ go_path(
"//runsc",
],
)
+
+# gazelle is a set of build tools.
+#
+# To update the WORKSPACE from go.mod, use:
+# bazel run //:gazelle -- update-repos -from_file=go.mod
+gazelle(name = "gazelle")