blob: 80b4aa13d1fd6126a481f57a7675cce9c1d60226 [file] [log] [blame]
Philipp Schrader37fdbb62021-12-18 00:30:37 -08001load("@ci_configure//:ci.bzl", "RUNNING_IN_CI")
2
Philipp Schrader773577f2021-12-17 23:45:39 -08003sh_binary(
4 name = "gofmt",
5 srcs = ["gofmt.sh"],
6 data = [
7 "@go_sdk//:bin/gofmt",
8 ],
9 deps = [
10 "@bazel_tools//tools/bash/runfiles",
11 ],
12)
13
14sh_binary(
15 name = "run-ci",
16 srcs = [
17 "run-ci.sh",
18 ],
19 data = [
20 ":gofmt",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080021 "//:gazelle-runner",
22 "//tools/go:tweak_gazelle_go_deps",
23 "@go_sdk//:bin/go",
Philipp Schrader773577f2021-12-17 23:45:39 -080024 ],
Philipp Schrader37fdbb62021-12-18 00:30:37 -080025 env = {
26 # Prevent CI errors like:
27 # failed to initialize build cache at
28 # /var/lib/buildkite-agent/.cache/go-build: permission denied
29 "RUNNING_IN_CI": "1" if RUNNING_IN_CI else "0",
30 },
Philipp Schrader773577f2021-12-17 23:45:39 -080031 deps = [
32 "@bazel_tools//tools/bash/runfiles",
33 ],
34)