Created
September 12, 2021 00:28
-
-
Save raphaelbruno/0f9649e030ef6a09858f3eb028d637cb to your computer and use it in GitHub Desktop.
Hook post-reveice (git init --bare)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
APP=/var/www/html | |
echo "================= Git Checkout ===================" | |
GIT_WORK_TREE=${APP} git checkout -f | |
echo "Updated ${APP}" | |
echo "============== Delete Unused Files ===============" | |
rm ${APP}/README.md | |
rm ${APP}/docker-compose.yml.example | |
rm ${APP}/.env.example | |
rm -r ${APP}/.docker | |
echo "Files deleted" | |
echo "============= Update Migrations ==============" | |
php ${APP}/artisan migrate | |
echo "========== Update Composer Dependencies ==========" | |
composer install -d ${APP} | |
echo "Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment