Skip to content

Commit

Permalink
Adjust release script to write the correct deps
Browse files Browse the repository at this point in the history
With the recent changes, bazeldnf/deps.bzl import preambles changed.
Reflecting this in the release script.
  • Loading branch information
rmohr committed Jul 11, 2024
1 parent 5027522 commit f59c989
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
5 changes: 4 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,7 @@ aspect_bazel_lib_register_toolchains()

load("@bazeldnf//bazeldnf:toolchain.bzl", "bazeldnf_prebuilt_register_toolchains")

bazeldnf_prebuilt_register_toolchains(name = "bazeldnf_prebuilt", register_toolchains = False)
bazeldnf_prebuilt_register_toolchains(
name = "bazeldnf_prebuilt",
register_toolchains = False,
)
11 changes: 11 additions & 0 deletions bazeldnf/deps.bzl
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
"""bazeldnf public dependency for WORKSPACE"""

load(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive",
"http_file",
)
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load(
"@bazeldnf//internal:rpm.bzl",
_rpm = "rpm",
)

rpm = _rpm

def bazeldnf_dependencies():
"""bazeldnf dependencies when consuming the repo externally"""
http_file(
name = "bazeldnf-linux-amd64",
executable = True,
Expand Down
4 changes: 2 additions & 2 deletions cmd/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ go_binary(

bazeldnf_toolchain(
name = "host-toolchain",
tool = ":cmd"
tool = ":cmd",
)

toolchain(
name = "bazeldnf-host-toolchain",
toolchain_type = "//bazeldnf:toolchain",
toolchain = ":host-toolchain",
toolchain_type = "//bazeldnf:toolchain",
)
11 changes: 11 additions & 0 deletions hack/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,23 @@ build_arch linux ppc64le
build_arch linux s390x

cat <<EOT >bazeldnf/deps.bzl
"""bazeldnf public dependency for WORKSPACE"""
load(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive",
"http_file",
)
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load(
"@bazeldnf//internal:rpm.bzl",
_rpm = "rpm",
)
rpm = _rpm
def bazeldnf_dependencies():
"""bazeldnf dependencies when consuming the repo externally"""
EOT

write_arch linux amd64
Expand Down

0 comments on commit f59c989

Please sign in to comment.