2023-02-09 15:42:00 +00:00
|
|
|
load("//:version.bzl", "version")
|
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:private"])
|
|
|
|
|
|
|
|
# This is a quick hack to make sure that version.bzl agrees with MODULE.bazel
|
|
|
|
# It only works from Linux, but that is sufficient, becuase we do a presubmit
|
2024-08-26 17:02:58 +00:00
|
|
|
# run on linux, so we will still catch a mismatch.
|
2023-02-09 15:42:00 +00:00
|
|
|
genrule(
|
|
|
|
name = "versions_match",
|
2023-02-09 15:56:04 +00:00
|
|
|
outs = ["found_it"],
|
2023-02-09 15:46:46 +00:00
|
|
|
cmd = ";\n".join([
|
|
|
|
"""echo version: %s""" % version,
|
|
|
|
"""grep 'version = "%s",' $(location //:MODULE.bazel) >$(location :found_it)""" % version,
|
|
|
|
]),
|
2023-02-09 15:42:00 +00:00
|
|
|
target_compatible_with = [
|
|
|
|
"//os:linux",
|
|
|
|
],
|
2023-02-09 15:56:04 +00:00
|
|
|
tools = [
|
|
|
|
"//:MODULE.bazel",
|
|
|
|
],
|
2023-02-09 15:42:00 +00:00
|
|
|
)
|