From 9f60ffa8851a0ac48804a8181e86b763bcfd298b Mon Sep 17 00:00:00 2001 From: Matteo Cafasso Date: Sun, 10 Nov 2024 23:19:05 +0200 Subject: [PATCH] Fix build process Again, RMQ Makefile was wiping the `plugins` folder so we had to fix the `EXTRA_DIST_EZS` whitelist. Most likely, absolute path were expected when applying the filter. Signed-off-by: Matteo Cafasso --- .github/workflows/action.yml | 3 +-- Makefile | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 12115f6..e452a4a 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -34,12 +34,11 @@ jobs: working-directory: ${{ env.PLUGIN_FOLDER }} run: | make current_rmq_ref=${{ matrix.rmqref }} - make deps make tests current_rmq_ref=${{ matrix.rmqref }} - name: Build distribution files working-directory: ${{ env.PLUGIN_FOLDER }} run: | - DIST_AS_EZS=yes make dist current_rmq_ref=${{ matrix.rmqref }} + MIX_ENV=prod DIST_AS_EZS=yes make dist current_rmq_ref=${{ matrix.rmqref }} - name: Store build artifacts uses: actions/upload-artifact@v3 with: diff --git a/Makefile b/Makefile index 14a7e20..130d53d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,6 @@ DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk # Mix customizations - MIX_ENV ?= dev override MIX := mix elixir_srcs := mix.exs @@ -17,17 +16,15 @@ elixir_srcs := mix.exs # which is not managed by erlang.mk. # We need to instruct the `rabbitmq-dist:do-dist` target to not # remove our plugin and related dependencies. -ELIXIR_ARCHIVE = $(shell ls plugins/elixir-*.ez) -PROJECT_ARCHIVE = $(shell ls plugins/$(PROJECT)-*.ez) -EXTRA_DIST_EZS = $(ELIXIR_ARCHIVE) $(PROJECT_ARCHIVE) +EXTRA_DIST_EZS = $(shell find $(PWD)/plugins -name *.ez) app:: $(elixir_srcs) deps $(MIX) make_app dist:: app mkdir -p $(DIST_DIR) - MIX_ENV=prod $(MIX) archive.build.elixir - MIX_ENV=prod $(MIX) archive.build -o $(DIST_DIR)/$(PROJECT)-$(PROJ_VSN).ez + $(MIX) archive.build.elixir + $(MIX) archive.build -o $(DIST_DIR)/$(PROJECT)-$(PROJ_VSN).ez cp -r _build/$(MIX_ENV)/archives/elixir-*.ez $(DIST_DIR) test-build:: app