2019-12-30 19:12:47 +01:00
|
|
|
#!/bin/bash
|
|
|
|
echo "######################"
|
|
|
|
echo " time to update the framadate setup"
|
|
|
|
echo "######################"
|
2021-02-12 15:23:27 +01:00
|
|
|
|
|
|
|
COMMAND_BUILD="build:prod:demobliss"
|
2021-02-12 14:39:45 +01:00
|
|
|
# git reset --hard
|
2019-12-30 19:12:47 +01:00
|
|
|
git pull origin master
|
|
|
|
|
|
|
|
composer install
|
|
|
|
php bin/console doctrine:schema:update --force
|
|
|
|
echo "######################"
|
2021-02-12 14:39:45 +01:00
|
|
|
echo " update the funky frontend submodule "
|
2019-12-30 19:12:47 +01:00
|
|
|
echo "######################"
|
2021-02-12 15:02:33 +01:00
|
|
|
if [ ! -d "funky-framadate-front" ]; then
|
|
|
|
# initiate sub directory for funky front
|
|
|
|
git submodule init
|
|
|
|
fi
|
|
|
|
|
|
|
|
git config --global diff.submodule log
|
2019-12-30 19:12:47 +01:00
|
|
|
git submodule update
|
|
|
|
echo "######################"
|
|
|
|
echo " check dependencies of the frontend with yarn "
|
|
|
|
echo "######################"
|
|
|
|
cd funky-framadate-front
|
2021-02-12 15:02:33 +01:00
|
|
|
echo "######################"
|
|
|
|
echo " debug info : version of programs"
|
|
|
|
echo " "
|
2021-02-12 15:04:21 +01:00
|
|
|
echo " git current branch "
|
|
|
|
git show-branch
|
|
|
|
echo " node version "
|
2021-02-12 15:02:33 +01:00
|
|
|
node -v
|
2021-02-12 15:04:21 +01:00
|
|
|
echo " yarn version "
|
2021-02-12 15:02:33 +01:00
|
|
|
yarn -v
|
2021-02-12 15:04:21 +01:00
|
|
|
echo " "
|
2021-02-12 15:02:33 +01:00
|
|
|
echo "######################"
|
2021-02-12 15:23:27 +01:00
|
|
|
git fetch
|
|
|
|
git pull
|
2019-12-30 19:12:47 +01:00
|
|
|
yarn
|
|
|
|
echo "######################"
|
|
|
|
echo " building the frontend "
|
2021-02-12 15:23:27 +01:00
|
|
|
echo " npm run $COMMAND_BUILD "
|
2019-12-30 19:12:47 +01:00
|
|
|
echo "######################"
|
2021-02-12 15:23:27 +01:00
|
|
|
npm run $COMMAND_BUILD
|
2021-02-12 14:39:45 +01:00
|
|
|
|
2019-12-30 19:12:47 +01:00
|
|
|
echo "######################"
|
|
|
|
echo " copying built files in the public folder of the symfony project "
|
|
|
|
echo "######################"
|
2021-02-12 15:23:27 +01:00
|
|
|
rm -rf ../public/*
|
|
|
|
cp -r dist/framadate/* ../public/
|
|
|
|
COUNT_FILES = ls -larth ../public |wc -l
|
|
|
|
cd ..
|
|
|
|
echo " $COUNT_FILES fichiers de build copiés dans /public"
|
2019-12-30 19:12:47 +01:00
|
|
|
echo "######################"
|
|
|
|
echo " done "
|
|
|
|
echo "######################"
|