load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files")

pkg_files(
    name = "sh-files",
    srcs = glob(["*.sh"]),
    attributes = pkg_attributes(mode = "0755"),
)

pkg_files(
    name = "non-sh-files",
    srcs = glob(
        ["*"],
        exclude = [
            "*.sh",
            "BUILD.bazel",
        ],
    ),
)

pkg_filegroup(
    name = "codeql-tools",
    srcs = [
        ":non-sh-files",
        ":sh-files",
    ],
    prefix = "tools",
    visibility = ["//go:__pkg__"],
)
