Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions misc/bazel/csharp.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def _gen_assembly_info(name):
native.genrule(
name = assembly_info_gen,
outs = [name + "AssemblyInfo.cs"],
cmd = "$(execpath //csharp/scripts:gen-assembly-info) $@ " + name,
tools = ["//csharp/scripts:gen-assembly-info"],
cmd = "$(execpath //misc/bazel/csharp:gen-assembly-info) $@ " + name,
tools = ["//misc/bazel/csharp:gen-assembly-info"],
)
return ":" + assembly_info_gen

Expand Down Expand Up @@ -83,7 +83,7 @@ def codeql_csharp_binary(name, **kwargs):
srcs.append(assembly_info_gen)

# always add the assembly info file that sets the AssemblyInformationalVersion attribute to the extractor version
srcs.append("//csharp/scripts:git-assembly-info-src")
srcs.append("//misc/bazel/csharp:git-assembly-info-src")

csharp_binary_target = "bin/" + name
publish_binary_target = "publish/" + name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "gen-git-assembly-info",
srcs = ["gen-git-assembly-info.py"],
deps = ["@rules_python//python/runfiles"],
)

py_binary(
name = "gen-assembly-info",
srcs = ["gen-assembly-info.py"],
visibility = ["//csharp:__subpackages__"],
deps = ["@rules_python//python/runfiles"],
visibility = ["//visibility:public"],
)

genrule(
Expand All @@ -19,5 +17,5 @@ genrule(
outs = ["GitAssemblyInfo.cs"],
cmd = "$(execpath :gen-git-assembly-info) $@ $(SRCS)",
tools = [":gen-git-assembly-info"],
visibility = ["//csharp:__subpackages__"],
visibility = ["//visibility:public"],
)
22 changes: 22 additions & 0 deletions misc/bazel/semmle_code_stub/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Stand-in for the `git_info` target provided by the internal repository, so that targets
# depending on it (e.g. `//misc/bazel/csharp:git-assembly-info-src`) can be built from this
# repository in isolation.
genrule(
name = "git-info-files",
outs = [
"git-describe-all.log",
"git-ql-describe-all.log",
"git-ql-rev-parse.log",
],
cmd = """
echo unknown > $(location git-describe-all.log)
echo no-git > $(location git-ql-describe-all.log)
echo unknown > $(location git-ql-rev-parse.log)
""",
)

filegroup(
name = "git_info",
srcs = [":git-info-files"],
visibility = ["//visibility:public"],
)
Loading