@@ -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