date-poll-api/update.sh

57 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
echo "######################"
echo " time to update the framadate setup"
echo "######################"
COMMAND_BUILD="build:prod:demobliss"
# git reset --hard
git pull origin master
composer install
php bin/console doctrine:schema:update --force
echo "######################"
echo " update the funky frontend submodule "
echo "######################"
if [ ! -d "funky-framadate-front" ]; then
# initiate sub directory for funky front
git submodule init
fi
git config --global diff.submodule log
git submodule update
echo "######################"
echo " check dependencies of the frontend with yarn "
echo "######################"
cd funky-framadate-front
echo "######################"
echo " debug info : version of programs"
echo " "
echo " git current branch "
git show-branch
echo " node version "
node -v
echo " yarn version "
yarn -v
echo " "
echo "######################"
git fetch
git pull
yarn
echo "######################"
echo " building the frontend "
echo " npm run $COMMAND_BUILD "
echo "######################"
npm run $COMMAND_BUILD
echo "######################"
echo " copying built files in the public folder of the symfony project "
echo "######################"
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"
echo "######################"
echo " done "
echo "######################"