ninefolio/misc/script/reconfigure.sh

30 lines
755 B
Bash
Raw Normal View History

2024-09-17 14:02:17 +02:00
#!/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=""
2024-09-20 18:47:12 +02:00
if [ ! -f public/build/.alias ]; then
echo "$APP_MANIFEST_KEY_PREFIX" > public/build/.alias
else
last_alias=$(cat public/build/.alias)
2024-09-17 14:02:17 +02:00
fi
2024-09-20 18:47:12 +02:00
if [[ ! -f "public/build/.alias" || "$APP_MANIFEST_KEY_PREFIX" != "$last_alias" ]]; then
2024-09-17 14:02:17 +02:00
echo "Alias a changé. Recompilation nécessaire."
2024-09-20 18:47:12 +02:00
echo "$APP_MANIFEST_KEY_PREFIX" > public/build/.alias
2024-09-17 14:02:17 +02:00
yarn encore dev
yarn encore prod
fi
bin/console app:AppInit
bin/console app:CronInit
exec $@