blob: 743c852a6a3030250927126b24a74e13a07d523b [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(
Philipp Schradercc016b32021-12-30 08:59:58 -080015 name = "buildifier",
16 srcs = ["buildifier.sh"],
17 data = [
18 "@com_github_bazelbuild_buildtools//buildifier",
19 ],
20 target_compatible_with = ["@platforms//cpu:x86_64"],
21 deps = [
22 "@bazel_tools//tools/bash/runfiles",
23 ],
24)
25
26sh_binary(
Philipp Schraderace08842022-03-26 14:52:55 -070027 name = "prettier",
28 srcs = ["prettier.sh"],
29 data = [
30 "@npm//prettier/bin:prettier",
31 ],
32 target_compatible_with = ["@platforms//cpu:x86_64"],
33 deps = [
34 "@bazel_tools//tools/bash/runfiles",
35 ],
36)
37
38sh_binary(
Philipp Schrader773577f2021-12-17 23:45:39 -080039 name = "run-ci",
40 srcs = [
41 "run-ci.sh",
42 ],
43 data = [
Philipp Schradercc016b32021-12-30 08:59:58 -080044 ":buildifier",
Philipp Schrader773577f2021-12-17 23:45:39 -080045 ":gofmt",
Philipp Schraderace08842022-03-26 14:52:55 -070046 ":prettier",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080047 "//:gazelle-runner",
Philipp Schraderd96d4cb2022-02-06 15:37:29 -080048 "//tools/go:mirror_go_repos",
Philipp Schrader37fdbb62021-12-18 00:30:37 -080049 "//tools/go:tweak_gazelle_go_deps",
50 "@go_sdk//:bin/go",
Philipp Schrader773577f2021-12-17 23:45:39 -080051 ],
Philipp Schrader37fdbb62021-12-18 00:30:37 -080052 env = {
53 # Prevent CI errors like:
54 # failed to initialize build cache at
55 # /var/lib/buildkite-agent/.cache/go-build: permission denied
56 "RUNNING_IN_CI": "1" if RUNNING_IN_CI else "0",
57 },
Philipp Schradercc016b32021-12-30 08:59:58 -080058 target_compatible_with = ["@platforms//cpu:x86_64"],
Philipp Schrader773577f2021-12-17 23:45:39 -080059 deps = [
60 "@bazel_tools//tools/bash/runfiles",
61 ],
62)