wip: go repositories
This commit is contained in:
parent
cb10c591be
commit
631906ffd8
@ -29,6 +29,11 @@ go_rules_dependencies()
|
||||
|
||||
go_register_toolchains(version = "1.16")
|
||||
|
||||
load("//:repositories.bzl", "go_repositories")
|
||||
|
||||
# gazelle:repository_macro repositories.bzl%go_repositories
|
||||
go_repositories()
|
||||
|
||||
gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE")
|
||||
|
||||
# protobuf is required for //:buildifier
|
||||
|
11
bin/mod-tidy
Executable file
11
bin/mod-tidy
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
bazel build @go_sdk//:go_sdk
|
||||
bazel-bazel-zig-cc/external/go_sdk/bin/go mod tidy
|
||||
exec bazel run //:gazelle -- update-repos \
|
||||
-from_file=go.mod \
|
||||
-prune \
|
||||
-to_macro=repositories.bzl%go_repositories
|
4
repositories.bzl
Normal file
4
repositories.bzl
Normal file
@ -0,0 +1,4 @@
|
||||
load("@bazel_gazelle//:deps.bzl", "go_repository")
|
||||
|
||||
def go_repositories():
|
||||
pass
|
Loading…
Reference in New Issue
Block a user