Skip to content

Commit 9e3401c

Browse files
committed
make self repository name parametric
In a workspace macro we must use the exact repository name, and this can be different when importing the workspace (it is different in semmle-code).
1 parent 73d5691 commit 9e3401c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

misc/bazel/workspace.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ _swift_arch_map = {
1212
"macos-x86_64": "darwin_x86_64",
1313
}
1414

15-
def codeql_workspace():
15+
def codeql_workspace(repository_name = "codeql"):
1616
for repo_arch, arch in _swift_arch_map.items():
1717
sha256 = _swift_sha_map[repo_arch]
1818

@@ -22,7 +22,7 @@ def codeql_workspace():
2222
_swift_prebuilt_version,
2323
repo_arch,
2424
),
25-
build_file = "@codeql//swift/extractor:BUILD.swift-prebuilt.bazel",
25+
build_file = "@%s//swift/extractor:BUILD.swift-prebuilt.bazel" % repository_name,
2626
sha256 = sha256,
2727
)
2828

0 commit comments

Comments
 (0)