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