generated from aspect-build/aspect-cli-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
55 lines (50 loc) · 1.88 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//release:release.bzl", "local_plugin")
# Run this target to update the go_* rules in this file
# bazel run //:gazelle
# gazelle:resolve go github.com/bazelbuild/buildtools/edit @com_github_bazelbuild_buildtools//edit:go_default_library
gazelle(name = "gazelle")
# Run this target to update the go.bzl file in this folder
# bazel run //:update_go_deps
gazelle(
name = "update_go_deps",
args = [
"-build_file_proto_mode=disable_global",
"-from_file=go.mod",
"-to_macro=go.bzl%deps",
"-prune",
],
command = "update-repos",
)
# gazelle:prefix github.com/aspect-build/plugin-fix-visibility
go_library(
name = "plugin-fix-visibility_lib",
srcs = ["plugin.go"],
importpath = "github.com/aspect-build/plugin-fix-visibility",
visibility = ["//:__subpackages__"],
deps = [
"@bazel_gazelle//label:go_default_library",
"@com_github_aspect_build_aspect_cli//bazel/buildeventstream",
"@com_github_aspect_build_aspect_cli//pkg/ioutils",
"@com_github_aspect_build_aspect_cli//pkg/plugin/sdk/v1alpha4/config",
"@com_github_aspect_build_aspect_cli//pkg/plugin/sdk/v1alpha4/plugin",
"@com_github_bazelbuild_buildtools//edit:go_default_library",
"@com_github_hashicorp_go_plugin//:go-plugin",
"@com_github_manifoldco_promptui//:promptui",
],
)
# Only used for local development.
# Release binaries are created by the target in /release
go_binary(
name = "plugin-fix-visibility",
embed = [":plugin-fix-visibility_lib"],
visibility = ["//visibility:public"],
)
# Copy the plugin to bazel-bin/plugin and checksum it.
# Referenced by the .aspect/cli/config.yaml in the `From:` line.
local_plugin(
name = "dev",
binary = ":plugin-fix-visibility",
path = "plugin",
)