Skip to content
Merged
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
5 changes: 3 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Module to handle everything bazel related concerning custom modules and rules"""

bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "buildifier_prebuilt", version = "8.0.0")
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1")
bazel_dep(name = "stardoc", version = "0.7.2")
bazel_dep(name = "ape", version = "1.0.1")
bazel_dep(name = "aspect_rules_js", version = "2.0.1")
Expand Down
152 changes: 8 additions & 144 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion bcr-modules/macros/add_module_macro.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

load("@rules_pkg//:mappings.bzl", "pkg_files")
load("@rules_pkg//:pkg.bzl", "pkg_zip")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//bcr-modules/rules:defs.bzl", "metadata_json")

def _add_module_macro_impl(name, visibility, versions, **kwargs):
Expand Down Expand Up @@ -37,7 +38,7 @@ def _add_module_macro_impl(name, visibility, versions, **kwargs):
)

# bazel run target to directly put the generated metadata information into the vector-bazel-central-registry/modules folder in the repo
native.sh_binary(
sh_binary(
name = name + ".add_to_repo",
srcs = ["//tools:add_module.sh"],
args = ["$(location @ape//ape:unzip)", "$(location " + name + ")", "vector-bazel-central-registry/modules/" + name],
Expand Down
5 changes: 1 addition & 4 deletions bcr-modules/macros/module_macro.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ def _module_macro_impl(
# used to package our module archive while at the same time setting the mode to 0755, this had to be done via pes-cd before.
pkg_tar(
name = name,
srcs = [name + "_srcs"] if len(pkg_files_targets) <= 0 else pkg_files_targets +
[
":" + name + "_BUILD_bazel",
],
srcs = [name + "_srcs", ":" + name + "_BUILD_bazel"] if len(pkg_files_targets) <= 0 else pkg_files_targets,
extension = "tar.gz",
mode = "0755",
visibility = visibility,
Expand Down
3 changes: 2 additions & 1 deletion bcr-modules/macros/upload_macro.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""A simple macro to build upload and download targets for a given module version and urls"""

load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//bcr-modules:urls.bzl", "DEFAULT_DEV_GIT_UPLOAD_URL", "DEFAULT_PROD_GIT_UPLOAD_URL")

def _get_url(url, upload_module_name, version):
Expand All @@ -22,7 +23,7 @@ def _upload_macro_impl(name, visibility, upload_module_name, version, archive, d

for target in URLS.keys():
# Add a convenience function to get moduel archive_override text
native.sh_binary(
sh_binary(
name = target + "_get_archive_override",
srcs = ["//tools:get_archive_override.sh"],
args = [
Expand Down
1 change: 1 addition & 0 deletions bcr-modules/modules/rules_cfg5/0.0.2/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module(
"rules_common@0.2.0",
# "rules_vtt@0.0.1",
],
integrity = "sha256-D2C00bzcFMYfFNhNd5HTmpGS3AaF+LDDDdoWbo0d1Wg=",
module_version = "0.0.2",
pkg_files_targets = [
"public",
Expand Down
68 changes: 68 additions & 0 deletions bcr-modules/modules/rules_cfg5/0.0.3/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
load("@rules_pkg//:mappings.bzl", "pkg_files")
load("//bcr-modules/macros:module_macro.bzl", "module")
load("//bcr-modules/macros:upload_macro.bzl", "module_upload")

package(default_visibility = ["//visibility:public"])

module_upload(
name = "upload",
archive = ":rules_cfg5",
upload_module_name = "rules_cfg5",
version = "0.0.3",
)

pkg_files(
name = "private",
srcs = [
"//bcr-modules/modules/rules_cfg5/srcs:private/generate.bzl",
"//bcr-modules/modules/rules_cfg5/srcs:private/start.bzl",
"//bcr-modules/modules/rules_cfg5/srcs:private/toolchains.bzl",
],
prefix = "private",
)

pkg_files(
name = "private_common",
srcs = [
"//bcr-modules/modules/rules_cfg5/srcs:private/common/component_refs.bzl",
],
prefix = "private/common",
)

pkg_files(
name = "private_templates",
srcs = [
"//bcr-modules/modules/rules_cfg5/srcs:private/templates/filter_linux.sh.tpl",
"//bcr-modules/modules/rules_cfg5/srcs:private/templates/filter_windows.ps1.tpl",
],
prefix = "private/templates",
)

pkg_files(
name = "public",
srcs = [
"//bcr-modules/modules/rules_cfg5/srcs:BUILD.bazel",
"//bcr-modules/modules/rules_cfg5/srcs:MODULE.bazel",
"//bcr-modules/modules/rules_cfg5/srcs:README.md",
"//bcr-modules/modules/rules_cfg5/srcs:defs.bzl",
"//bcr-modules/modules/rules_cfg5/srcs:generate.bzl",
],
)

module(
name = "rules_cfg5",
additional_dependencies = [
"ape@1.0.1",
"bazel_skylib@1.7.1",
"rules_cc@0.1.1",
"rules_common@0.2.0",
# "rules_vtt@0.0.1",
],
module_version = "0.0.3",
pkg_files_targets = [
"public",
"private",
"private_common",
"private_templates",
],
)
1 change: 1 addition & 0 deletions bcr-modules/modules/rules_cfg5/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module_bcr_dir(
name = "rules_cfg5",
versions = [
"0.0.2",
"0.0.3",
],
visibility = ["//visibility:public"],
)
2 changes: 1 addition & 1 deletion bcr-modules/modules/rules_cfg5/srcs/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

module(
name = "rules_cfg5",
version = "0.0.2",
version = "0.0.3",
compatibility_level = 0,
)

Expand Down
2 changes: 2 additions & 0 deletions bcr-modules/modules/rules_cfg5/srcs/private/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

"""Rules for cfg5"""

load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
load("//rules/common:create_davinci_tool_workspace.bzl", "create_davinci_tool_workspace")
#load("//rules/vtt:toolchains.bzl", "generate_tools_vtt")

Expand Down
Loading
Loading