Bazel: code reorganization

This commit is contained in:
Paolo Tranquilli
2022-04-08 15:58:33 +02:00
parent 664d5ba0a9
commit 13b2442fed
6 changed files with 30 additions and 18 deletions

View File

@@ -3,17 +3,3 @@ codeql_platform = select({
"@platforms//os:macos": "osx64",
"@platforms//os:windows": "win64",
})
_paths_bzl = """
def source_dir():
return '%s/' + native.package_name()
"""
def _ql_utils_impl(repository_ctx):
root = repository_ctx.path(Label("@ql//:WORKSPACE.bazel")).realpath.dirname
repository_ctx.file("BUILD.bazel")
repository_ctx.file("paths.bzl", content = _paths_bzl % root)
ql_utils = repository_rule(
implementation = _ql_utils_impl,
)