mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Re-implement the git version logic using an attribute.
This commit is contained in:
@@ -39,14 +39,15 @@ def codeql_csharp_binary(name, **kwargs):
|
||||
nullable = kwargs.pop("nullable", "enable")
|
||||
visibility = kwargs.pop("visibility", ["//visibility:public"])
|
||||
resources = kwargs.pop("resources", [])
|
||||
srcs = kwargs.pop("srcs", [])
|
||||
|
||||
# the entry assembly always has the git info embedded
|
||||
resources.append("@semmle_code//:git_info")
|
||||
# always add the assembly info file that sets the AssemblyInformationalVersion attribute to the extractor version
|
||||
srcs.append("//csharp/scripts:assembly-info-src")
|
||||
|
||||
target_frameworks = kwargs.pop("target_frameworks", [TARGET_FRAMEWORK])
|
||||
csharp_binary_target = "bin/" + name
|
||||
publish_binary_target = "publish/" + name
|
||||
csharp_binary(name = csharp_binary_target, nullable = nullable, target_frameworks = target_frameworks, resources = resources, visibility = visibility, **kwargs)
|
||||
csharp_binary(name = csharp_binary_target, srcs = srcs, nullable = nullable, target_frameworks = target_frameworks, resources = resources, visibility = visibility, **kwargs)
|
||||
publish_binary(
|
||||
name = publish_binary_target,
|
||||
binary = csharp_binary_target,
|
||||
|
||||
Reference in New Issue
Block a user