mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Java/Kotlin: prepare for internal bazel packaging
This commit is contained in:
12
java/downgrades/BUILD.bazel
Normal file
12
java/downgrades/BUILD.bazel
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
|
||||||
|
|
||||||
|
pkg_files(
|
||||||
|
name = "downgrades",
|
||||||
|
srcs = glob(
|
||||||
|
["**"],
|
||||||
|
exclude = ["BUILD.bazel"],
|
||||||
|
),
|
||||||
|
prefix = "downgrades",
|
||||||
|
strip_prefix = strip_prefix.from_pkg(),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
@@ -178,4 +178,13 @@ _resources = [
|
|||||||
actual = _common_extractor_name_prefix,
|
actual = _common_extractor_name_prefix,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
),
|
),
|
||||||
|
filegroup(
|
||||||
|
name = "many",
|
||||||
|
srcs = ["%s-%s-%s" % (
|
||||||
|
_common_extractor_name_prefix,
|
||||||
|
variant,
|
||||||
|
version,
|
||||||
|
) for variant in ("standalone", "embeddable") for version in VERSIONS],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
),
|
||||||
) if not _for_embeddable else None
|
) if not _for_embeddable else None
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ for src in sources:
|
|||||||
lfs_pointer = input.read()
|
lfs_pointer = input.read()
|
||||||
rel_src = src.relative_to(source_dir).as_posix()
|
rel_src = src.relative_to(source_dir).as_posix()
|
||||||
with open(src.name, 'wb') as output:
|
with open(src.name, 'wb') as output:
|
||||||
subprocess.run(["git", "-c", f"lfs.fetchinclude={rel_src}", "lfs", "smudge", "--", rel_src],
|
subprocess.run(
|
||||||
input=lfs_pointer, stdout=output, check=True, cwd=source_dir)
|
["git",
|
||||||
|
"-c", f"lfs.fetchinclude={rel_src}", "-c", "lfs.fetchexclude=",
|
||||||
|
"lfs", "smudge", "--", rel_src],
|
||||||
|
input=lfs_pointer, stdout=output, check=True, cwd=source_dir)
|
||||||
continue
|
continue
|
||||||
pathlib.Path(src.name).symlink_to(src)
|
pathlib.Path(src.name).symlink_to(src)
|
||||||
|
|||||||
Reference in New Issue
Block a user