Skip to content

Commit

Permalink
Another attempt
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
  • Loading branch information
noxdafox committed Jan 26, 2024
1 parent 12928c8 commit f242f7a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,28 @@ 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_VERSION := $(shell elixir --version | grep Elixir | cut -d ' ' -f 2)
PROJECT_VERSION := $(shell git describe --tags --abbrev=0)
EXTRA_DIST_EZS := plugins/elixir-$(ELIXIR_VERSION).ez plugins/$(PROJECT)-$(PROJECT_VERSION).ez
ELIXIR_ARCHIVE = $(shell ls plugins/elixir-*.ez)
PROJECT_ARCHIVE = $(shell ls plugins/$(PROJECT)-*.ez)
EXTRA_DIST_EZS = $(ELIXIR_ARCHIVE) $(PROJECT_ARCHIVE)

app:: $(elixir_srcs) deps
$(MIX) make_app

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

test-build::
test-build:: app
mkdir -p $(DIST_DIR)
$(MIX) make_archives
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
echo $(EXTRA_DIST_EZS)

clean::
@rm -fr _build
Expand Down

0 comments on commit f242f7a

Please sign in to comment.