Skip to content

Commit

Permalink
mix: enforce broker requirements solely in build
Browse files Browse the repository at this point in the history
Otherwise, we cannot test from other builds.

Signed-off-by: Matteo Cafasso <[email protected]>
  • Loading branch information
noxdafox committed Oct 23, 2024
1 parent 401a1b8 commit 845b61a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ app:: $(elixir_srcs) deps

dist:: app
mkdir -p $(DIST_DIR)
$(MIX) archive.build.elixir
$(MIX) archive.build -o $(DIST_DIR)/$(PROJECT)-$(PROJ_VSN).ez
MIX_ENV=prod $(MIX) archive.build.elixir
MIX_ENV=prod $(MIX) archive.build -o $(DIST_DIR)/$(PROJECT)-$(PROJ_VSN).ez
cp -r _build/$(MIX_ENV)/archives/elixir-*.ez $(DIST_DIR)

test-build:: app
Expand Down
6 changes: 5 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ defmodule RabbitMQ.MessageDeduplicationPlugin.Mixfile do
extra_applications: [:rabbit],
mod: {RabbitMQMessageDeduplication, []},
registered: [RabbitMQMessageDeduplication],
broker_version_requirements: ["3.13.0", "4.0.0"]
broker_version_requirements: if Mix.env == :prod do
["3.13.0", "4.0.0"]
else
[]
end
]
end

Expand Down

0 comments on commit 845b61a

Please sign in to comment.