forked from bazelbuild/bazelisk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
56 lines (50 loc) · 1.31 KB
/
BUILD
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
56
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle:prefix github.com/bazelbuild/bazelisk
gazelle(name = "gazelle")
sh_test(
name = "py_bazelisk_test",
srcs = ["bazelisk_test.sh"],
args = ["PY"],
data = [
"bazelisk.py",
"releases_for_tests.json",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
sh_test(
name = "py3_bazelisk_test",
srcs = ["bazelisk_test.sh"],
args = ["PY3"],
data = [
"bazelisk.py",
"releases_for_tests.json",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
sh_test(
name = "go_bazelisk_test",
srcs = ["bazelisk_test.sh"],
args = ["GO"],
data = [
"releases_for_tests.json",
":bazelisk",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
go_library(
name = "go_default_library",
srcs = ["bazelisk.go"],
importpath = "github.com/bazelbuild/bazelisk",
visibility = ["//visibility:private"],
x_defs = {"BazeliskVersion": "{STABLE_VERSION}"},
deps = [
"@com_github_hashicorp_go_version//:go_default_library",
"@com_github_mitchellh_go_homedir//:go_default_library",
],
)
go_binary(
name = "bazelisk",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)