From 6b337b49c7f7c500e128cce60d8086a1c972c491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Thu, 8 Apr 2021 10:50:39 +0200 Subject: Use {MIX,HEX}_HOME variables to prepare offline cache We used to use $HOME for both tools, but they now support dedicated variables. As an added bonus, this makes the recipe work on Microsoft Windows. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8871838591..7826e51ee4 100644 --- a/Makefile +++ b/Makefile @@ -213,8 +213,8 @@ $(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST) mix_exs=$@/deps/$$(basename $$dep)/mix.exs; \ if test -f $$mix_exs; then \ (cd $$(dirname "$$mix_exs") && \ - env DEPS_DIR=$@/deps HOME=$@/deps MIX_ENV=prod FILL_HEX_CACHE=yes mix local.hex --force && \ - env DEPS_DIR=$@/deps HOME=$@/deps MIX_ENV=prod FILL_HEX_CACHE=yes mix deps.get --only prod && \ + (test -d $@/deps/.hex || env DEPS_DIR=$@/deps MIX_HOME=$@/deps/.mix HEX_HOME=$@/deps/.hex MIX_ENV=prod FILL_HEX_CACHE=yes mix local.hex --force) && \ + env DEPS_DIR=$@/deps MIX_HOME=$@/deps/.mix HEX_HOME=$@/deps/.hex MIX_ENV=prod FILL_HEX_CACHE=yes mix deps.get --only prod && \ cp $(CURDIR)/mk/rabbitmq-mix.mk . && \ rm -rf _build deps); \ fi; \ -- cgit v1.2.1