Improve precompilation
This commit is contained in:
parent
f0a04f30d5
commit
645a59caf7
@ -4,8 +4,10 @@ set -e
|
|||||||
|
|
||||||
function compile {
|
function compile {
|
||||||
# Make sure that the tooling is present
|
# Make sure that the tooling is present
|
||||||
mix local.hex --force
|
if [[ ! -d /mix-archives/hex-* ]] || [[ ! -f /mix/rebar ]] || [[ ! -f /mix/rebar3 ]]; then
|
||||||
mix local.rebar --force
|
mix local.hex --force
|
||||||
|
mix local.rebar --force
|
||||||
|
fi
|
||||||
|
|
||||||
# Recompile
|
# Recompile
|
||||||
mix deps.get
|
mix deps.get
|
||||||
@ -14,9 +16,16 @@ function compile {
|
|||||||
|
|
||||||
# Execute onbuild actions if required
|
# Execute onbuild actions if required
|
||||||
if [[ "$1" == "onbuild" ]]; then
|
if [[ "$1" == "onbuild" ]]; then
|
||||||
# On build we use the sources instead of the runtime
|
# Pretend we're in runtime mode
|
||||||
cd /pleroma
|
mv /pleroma /pleroma-runtime
|
||||||
|
cd /pleroma-runtime
|
||||||
|
|
||||||
|
# Build pleroma
|
||||||
compile
|
compile
|
||||||
|
|
||||||
|
# Put precompiled sources back
|
||||||
|
cd /
|
||||||
|
mv /pleroma-runtime /pleroma
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user