-
-
Save dragonmantank/5825905db1dd18010152 to your computer and use it in GitHub Desktop.
Auto-run Composer on branch checkout
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
# .git/hooks/post-checkout | |
#!/bin/bash | |
# | |
source ~/.profile | |
# Allows us to read user input below, assigns stdin to keyboard | |
exec < /dev/tty | |
while true; do | |
read -p "Run Composer install, Asset Dump and DB Migrations? [Y/n]: " yn | |
case $yn in | |
[Yy]* ) /usr/local/bin/php /usr/bin/composer install; /usr/local/bin/php app/console doctrine:migrations:migrate; gulp build; break;; | |
[Nn]* ) exit;; | |
* ) echo "Please answer yes or no.";; | |
esac | |
done% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment