C#: Move to new packaging rules.

This commit is contained in:
Cornelius Riemenschneider 2024-05-30 10:54:37 +02:00
Родитель 60b5317c5f
Коммит d66d7d8a3a
2 изменённых файлов: 8 добавлений и 16 удалений

Просмотреть файл

@ -1,6 +1,5 @@
load("@rules_pkg//pkg:mappings.bzl", "pkg_filegroup", "pkg_files")
load("@semmle_code//:dist.bzl", "dist")
load("//misc/bazel:pkg.bzl", "codeql_pkg_files_overlay")
load("//misc/bazel:pkg.bzl", "codeql_pack", "codeql_pkg_files_overlay")
package(default_visibility = ["//visibility:public"])
@ -59,22 +58,16 @@ codeql_pkg_files_overlay(
],
)
dist(
name = "extractor-arch",
srcs = [":extractor-arch-overlay"],
)
dist(
name = "extractor-generic",
codeql_pack(
name = "csharp",
srcs = [
":dbscheme-group",
":extra-files",
":extractor-arch-overlay",
":extractor-asp",
"//csharp/downgrades",
"//csharp/tools",
],
prefix = "csharp",
visibility = ["//visibility:public"],
)
test_suite(

Просмотреть файл

@ -1,7 +1,6 @@
load("@rules_dotnet//dotnet:defs.bzl", "csharp_binary", "csharp_library", "csharp_test", "publish_binary")
load("@rules_pkg//pkg:mappings.bzl", "strip_prefix")
load("@semmle_code//:dist.bzl", "pack_zip")
load("//:defs.bzl", "codeql_platform")
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")
TARGET_FRAMEWORK = "net8.0"
@ -60,10 +59,10 @@ def codeql_csharp_binary(name, **kwargs):
),
)
pack_zip(
codeql_pkg_files(
name = name,
srcs = [publish_binary_target],
prefix = language_prefix + "/tools/" + codeql_platform,
exes = [publish_binary_target],
prefix = "tools/{CODEQL_PLATFORM}",
strip_prefix = strip_prefix.files_only(),
visibility = visibility,
)