Skip to content

Commit

Permalink
Fix build process
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
noxdafox committed Nov 10, 2024
1 parent 8e89d7e commit 9f60ffa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9f60ffa

Please sign in to comment.