30 lines
755 B
Bash
Executable File
30 lines
755 B
Bash
Executable File
#!/bin/bash
|
||
set -eo pipefail
|
||
|
||
# Se positionner sur la racine du projet
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||
cd ${DIR}
|
||
cd ../..
|
||
DIR=$(pwd)
|
||
|
||
bin/console d:s:u --force --complete
|
||
|
||
# Si l'alias courrant est différent que celui généré = on compile encore
|
||
last_alias=""
|
||
if [ ! -f public/build/.alias ]; then
|
||
echo "$APP_MANIFEST_KEY_PREFIX" > public/build/.alias
|
||
else
|
||
last_alias=$(cat public/build/.alias)
|
||
fi
|
||
|
||
if [[ ! -f "public/build/.alias" || "$APP_MANIFEST_KEY_PREFIX" != "$last_alias" ]]; then
|
||
echo "Alias a changé. Recompilation nécessaire."
|
||
echo "$APP_MANIFEST_KEY_PREFIX" > public/build/.alias
|
||
yarn encore dev
|
||
yarn encore prod
|
||
fi
|
||
|
||
bin/console app:AppInit
|
||
bin/console app:CronInit
|
||
|
||
exec $@ |