Skip to content

Commit

Permalink
Use built-in mix task archive.build instead of archive.build.all
Browse files Browse the repository at this point in the history
The later implemented in `mix_task_archive_deps` uses
`Mix.Dep.load_on_environment/1` which was removed in Elixir 1.16.0.
This plugin has no dependencies so the two tasks are mostly
equivalent.

The mix task `archive.build.elixir` is still used from
`mix_task_archive_deps`.
  • Loading branch information
gomoripeti committed Jun 26, 2024
1 parent c661e8c commit 415e16e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PROJECT = rabbitmq_message_deduplication
PROJ_VSN = $(shell $(MIX) eval 'Mix.Project.config()[:version] |> IO.puts()')

DEPS = rabbit_common rabbit
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers amqp_client
Expand All @@ -25,15 +26,15 @@ app:: $(elixir_srcs) deps

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

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

tests:: $(elixir_srcs) deps
MIX_ENV=test $(MIX) make_tests
Expand Down

0 comments on commit 415e16e

Please sign in to comment.