summaryrefslogtreecommitdiff
path: root/repository_defs.bzl
blob: 5bbc9cb4a7abc75d3c9eaad62c0cb6b1e261530c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# A hacky way to work around the fact that native.bazel_version is only
# available from WORKSPACE macros, not BUILD macros or rules.
#
# Hopefully we can remove this if/when this is fixed:
#   https://github.com/bazelbuild/bazel/issues/8305

def _impl(repository_ctx):
    s = "bazel_version = \"" + native.bazel_version + "\""
    repository_ctx.file("bazel_version.bzl", s)
    repository_ctx.file("BUILD", "")

bazel_version_repository = repository_rule(
    implementation=_impl,
    local=True,
)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback