mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
70 lines
1.8 KiB
Bash
Executable File
70 lines
1.8 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 "######################"
|
|
cd ../public
|
|
rm ./*.js
|
|
rm ./*.css
|
|
cd ../funky-framadate-front
|
|
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 " renaming unieque name of JS chunks to common names for templates "
|
|
cd public
|
|
|
|
mv runtime* runtime.js
|
|
mv main* main.js
|
|
mv polyfills-es5* es5-polyfills.js
|
|
mv polyfills* other-polyfills.js
|
|
mv scripts* scripts.js
|
|
mv styles* styles.css
|
|
echo "##################################################################"
|
|
echo " $(date) ------- done "
|
|
echo "######################"
|