diff --git a/scripts/release/BUILD.bazel b/scripts/release/BUILD.bazel index 141bf20..45826c5 100644 --- a/scripts/release/BUILD.bazel +++ b/scripts/release/BUILD.bazel @@ -52,7 +52,7 @@ versioned_module_bazel( ) dcomment( - name = "uncomment_module_bazel", + name = "root_module_bazel", src = ":versioned_module_bazel", out = "root_MODULE.bazel", defines = "_BZLPARTY_RELEASE_", @@ -67,20 +67,18 @@ dcomment( tags = ["manual"], ) -root_build_file(name = "root_BUILD") +root_build_file(name = "root_build_bazel") -toolchains_build_file(name = "toolchains_BUILD") +toolchains_build_file(name = "toolchains_build_bazel") git_archive( name = "git_archive", package_name = "tools", - tags = ["manual"], virtual_files = { - # these files come from `dist_files` macro - ":root_BUILD.bazel": "BUILD.bazel", - ":root_MODULE.bazel": "MODULE.bazel", - ":docs_BUILD.bazel": "docs/BUILD.bazel", - ":toolchains_BUILD.bazel": "toolchains/BUILD.bazel", + ":root_build_bazel": "BUILD.bazel", + ":root_module_bazel": "MODULE.bazel", + ":docs_build_bazel": "docs/BUILD.bazel", + ":toolchains_build_bazel": "toolchains/BUILD.bazel", ":sha_assets": "toolchains/sha/assets.bzl", ":templ_assets": "toolchains/templ/assets.bzl", }, diff --git a/scripts/release/defs.bzl b/scripts/release/defs.bzl index 98567d7..1b79606 100644 --- a/scripts/release/defs.bzl +++ b/scripts/release/defs.bzl @@ -47,16 +47,23 @@ bzl_library( ) """ -def root_build_file(name): +def _write_build_file(name, prefix, content): write_file( - name = "%s_bazel" % name.lower(), - out = "%s.bazel" % name, + name = name, + out = "%s_BUILD.bazel" % prefix, + content = content, + ) + +def root_build_file(name): + _write_build_file( + name = name, + prefix = "root", content = [_ROOT_BUILD_FILE], ) def toolchains_build_file(name): - write_file( - name = "%s_bazel" % name.lower(), - out = "%s.bazel" % name, + _write_build_file( + name = name, + prefix = "toolchains", content = [_TOOLCHAINS_BUILD_FILE], )