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.
This commit is contained in:
parent
f49bb000d1
commit
6b337b49c7
4
Makefile
4
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; \
|
||||
|
|
|
@ -13,9 +13,9 @@ HEX_OFFLINE := 1
|
|||
|
||||
override MIX_HOME := $(DEPS_DIR)/.mix
|
||||
|
||||
# In addition to `$MIX_HOME`, we still have to set `$HOME` which is used
|
||||
# to find `~/.hex` where the Hex.pm cache and packages are stored.
|
||||
# In addition to `$MIX_HOME`, we still have to set `$HEX_HOME` which is used to
|
||||
# find `~/.hex` where the Hex.pm cache and packages are stored.
|
||||
|
||||
override HOME := $(DEPS_DIR)
|
||||
override HEX_HOME := $(DEPS_DIR)/.hex
|
||||
|
||||
export HEX_OFFLINE MIX_HOME HOME
|
||||
export HEX_OFFLINE MIX_HOME HEX_HOME
|
||||
|
|
Loading…
Reference in New Issue