diff options
author | Rin Kuryloski <kuryloskip@vmware.com> | 2023-05-04 08:31:54 +0200 |
---|---|---|
committer | Rin Kuryloski <kuryloskip@vmware.com> | 2023-05-12 08:26:42 +0200 |
commit | 19f4abd55b0d25b61feb75ff4447b75490fe0700 (patch) | |
tree | 638e4a784f54c256fcc3a3ae06d80be06512cf07 /deps | |
parent | 45520436e8ed9f5f9f4d5cb8d25d054699ede716 (diff) | |
download | rabbitmq-server-git-19f4abd55b0d25b61feb75ff4447b75490fe0700.tar.gz |
Build cli deps as .ez archives
This provides an elixir/erlang agnostic way of providing them other
erlang rules
Diffstat (limited to 'deps')
-rw-r--r-- | deps/rabbitmq_cli/BUILD.bazel | 28 | ||||
-rw-r--r-- | deps/rabbitmq_cli/rabbitmqctl.bzl | 2 | ||||
-rw-r--r-- | deps/rabbitmq_cli/rabbitmqctl_test.bzl | 4 |
3 files changed, 31 insertions, 3 deletions
diff --git a/deps/rabbitmq_cli/BUILD.bazel b/deps/rabbitmq_cli/BUILD.bazel index b2dcc1c3e0..0f66ea3576 100644 --- a/deps/rabbitmq_cli/BUILD.bazel +++ b/deps/rabbitmq_cli/BUILD.bazel @@ -5,6 +5,34 @@ load(":rabbitmqctl_test.bzl", "rabbitmqctl_test") load("//:rabbitmq_home.bzl", "rabbitmq_home") load("//:rabbitmq_run.bzl", "rabbitmq_run") load("//:rabbitmq.bzl", "RABBITMQ_DIALYZER_OPTS", "STARTS_BACKGROUND_BROKER_TAG", "without") +load( + "@rabbitmq-server//bazel/elixir:mix_archive_build.bzl", + "mix_archive_build", +) + +mix_archive_build( + name = "parallel_stream_ez", + srcs = ["@parallel_stream//:sources"], + archives = ["@hex//:archive"], + out = "parallel_stream.ez", +) + +mix_archive_build( + name = "csv_ez", + srcs = ["@csv//:sources"], + archives = ["@hex//:archive"], + ez_deps = [ + ":parallel_stream_ez", + ], + out = "csv.ez", +) + +mix_archive_build( + name = "json_ez", + srcs = ["@json//:sources"], + archives = ["@hex//:archive"], + out = "json.ez", +) # Note: All the various rabbitmq-* scripts are just copies of rabbitmqctl rabbitmqctl( diff --git a/deps/rabbitmq_cli/rabbitmqctl.bzl b/deps/rabbitmq_cli/rabbitmqctl.bzl index 35f330f9d9..10890d3457 100644 --- a/deps/rabbitmq_cli/rabbitmqctl.bzl +++ b/deps/rabbitmq_cli/rabbitmqctl.bzl @@ -149,7 +149,7 @@ find . -type l -delete escript_path = escript.path, ebin_dir = ebin.path, consolidated_dir = consolidated.path, - archives = "".join([shell.quote(a.path) for a in ctx.files.archives]), + archives = " ".join([shell.quote(a.path) for a in ctx.files.archives]), precompiled_deps = " ".join([ dep[ErlangAppInfo].app_name for dep in ctx.attr.deps diff --git a/deps/rabbitmq_cli/rabbitmqctl_test.bzl b/deps/rabbitmq_cli/rabbitmqctl_test.bzl index f3ef9f5169..3ba076f2f9 100644 --- a/deps/rabbitmq_cli/rabbitmqctl_test.bzl +++ b/deps/rabbitmq_cli/rabbitmqctl_test.bzl @@ -139,7 +139,7 @@ set -x elixir_home = elixir_home, package_dir = package_dir, deps_dir = deps_dir, - archives = "".join([shell.quote(a.short_path) for a in ctx.files.archives]), + archives = " ".join([shell.quote(a.short_path) for a in ctx.files.archives]), precompiled_deps = precompiled_deps, rabbitmq_run_cmd = ctx.attr.rabbitmq_run[DefaultInfo].files_to_run.executable.short_path, ) @@ -196,7 +196,7 @@ exit /b 1 elixir_home = windows_path(elixir_home), package_dir = windows_path(ctx.label.package), deps_dir = deps_dir, - archives = "".join([shell.quote(a.short_path) for a in ctx.files.archives]), + archives = " ".join([shell.quote(a.short_path) for a in ctx.files.archives]), precompiled_deps = precompiled_deps, rabbitmq_run_cmd = ctx.attr.rabbitmq_run[DefaultInfo].files_to_run.executable.short_path, ) |