Skip to content

Commit 53c38a9

Browse files
authored
Merge pull request #7475 from rabbitmq/mergify/bp/v3.11.x/pr-7474
Pin rabbitmq_cli prod deps (backport #7467) (backport #7474)
2 parents 6ceee54 + 2e27496 commit 53c38a9

File tree

3 files changed

+46
-50
lines changed

3 files changed

+46
-50
lines changed

deps/rabbitmq_cli/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ rabbitmqctl(
2020
visibility = ["//visibility:public"],
2121
deps = [
2222
"//deps/rabbit_common:erlang_app",
23+
"@observer_cli//:erlang_app",
24+
"@stdout_formatter//:erlang_app",
2325
],
2426
)
2527

@@ -119,6 +121,8 @@ rabbitmqctl_test(
119121
"//deps/amqp_client:erlang_app",
120122
"//deps/rabbit:erlang_app",
121123
"//deps/rabbit_common:erlang_app",
124+
"@observer_cli//:erlang_app",
125+
"@stdout_formatter//:erlang_app",
122126
],
123127
)
124128

deps/rabbitmq_cli/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PROJECT = rabbitmq_cli
22

33
BUILD_DEPS = rabbit_common
4-
DEPS = observer_cli
4+
DEPS = observer_cli stdout_formatter
55
TEST_DEPS = amqp_client rabbit
66

77
DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk

deps/rabbitmq_cli/mix.exs

Lines changed: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -123,59 +123,51 @@ defmodule RabbitMQCtl.MixfileBase do
123123
# self-contained and RabbitMQ must be buildable offline). However, we
124124
# don't have the equivalent for other methods.
125125
defp deps() do
126-
elixir_deps = [
127-
{:json, "~> 1.4.1"},
128-
{:csv, "~> 2.4.0"},
129-
{:stdout_formatter, "~> 0.2.3"},
130-
{:observer_cli, "~> 1.7.3"},
126+
deps_dir = System.get_env("DEPS_DIR", "deps")
127+
128+
# Mix is confused by any `rebar.{config,lock}` we might have left in
129+
# `rabbit_common` or `amqp_client`. So just remove those files to be
130+
# safe, as they are generated when we publish to Hex.pm only.
131+
for dir <- ["rabbit_common", "amqp_client"] do
132+
for file <- ["rebar.config", "rebar.lock"] do
133+
File.rm(Path.join([deps_dir, dir, file]))
134+
end
135+
end
136+
137+
make_cmd = System.get_env("MAKE", "make")
138+
is_bazel = System.get_env("IS_BAZEL") != nil
139+
140+
[
141+
{:json, "1.4.1"},
142+
{:csv, "2.4.1"},
143+
{
144+
:stdout_formatter,
145+
path: Path.join(deps_dir, "stdout_formatter"),
146+
compile: if(is_bazel, do: false, else: make_cmd)
147+
},
148+
{
149+
:observer_cli,
150+
path: Path.join(deps_dir, "observer_cli"),
151+
compile: if(is_bazel, do: false, else: make_cmd)
152+
},
131153
{:amqp, "~> 2.1.0", only: :test},
132154
{:dialyxir, "~> 0.5", only: :test, runtime: false},
133155
{:temp, "~> 0.4", only: :test},
134-
{:x509, "~> 0.7", only: :test}
156+
{:x509, "~> 0.7", only: :test},
157+
{
158+
:rabbit_common,
159+
path: Path.join(deps_dir, "rabbit_common"),
160+
compile: if(is_bazel, do: false, else: make_cmd),
161+
override: true
162+
},
163+
{
164+
:amqp_client,
165+
path: Path.join(deps_dir, "amqp_client"),
166+
compile: if(is_bazel, do: false, else: make_cmd),
167+
override: true,
168+
only: :test
169+
}
135170
]
136-
137-
rabbitmq_deps =
138-
case System.get_env("DEPS_DIR") do
139-
nil ->
140-
# rabbitmq_cli is built as a standalone Elixir application.
141-
[
142-
{:rabbit_common, "~> 3.8.0"},
143-
{:amqp_client, "~> 3.8.0", only: :test}
144-
]
145-
146-
deps_dir ->
147-
# rabbitmq_cli is built as part of RabbitMQ.
148-
149-
# Mix is confused by any `rebar.{config,lock}` we might have left in
150-
# `rabbit_common` or `amqp_client`. So just remove those files to be
151-
# safe, as they are generated when we publish to Hex.pm only.
152-
for dir <- ["rabbit_common", "amqp_client"] do
153-
for file <- ["rebar.config", "rebar.lock"] do
154-
File.rm(Path.join([deps_dir, dir, file]))
155-
end
156-
end
157-
158-
make_cmd = System.get_env("MAKE", "make")
159-
is_bazel = System.get_env("IS_BAZEL") != nil
160-
161-
[
162-
{
163-
:rabbit_common,
164-
path: Path.join(deps_dir, "rabbit_common"),
165-
compile: if(is_bazel, do: false, else: make_cmd),
166-
override: true
167-
},
168-
{
169-
:amqp_client,
170-
path: Path.join(deps_dir, "amqp_client"),
171-
compile: if(is_bazel, do: false, else: make_cmd),
172-
override: true,
173-
only: :test
174-
}
175-
]
176-
end
177-
178-
elixir_deps ++ rabbitmq_deps
179171
end
180172

181173
defp aliases do

0 commit comments

Comments
 (0)