Created
January 30, 2016 23:23
-
-
Save connordavison/b174ce3a458991a71590 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
| WEBROOT=~/www/ | |
| if [ ! -d $WEBROOT ]; then | |
| mkdir $WEBROOT -p | |
| fi | |
| cd $WEBROOT | |
| # Attempt to update the repo | |
| git fetch | |
| # Clear caches | |
| rm -rf storage/cache/* | |
| echo 'Cache cleared' | |
| rm -rf storage/views/* | |
| echo 'Views cleared' | |
| if [ -f composer.json ]; then | |
| # Detect composer | |
| if which composer > /dev/null; then | |
| composer='composer' | |
| elif which composer.phar > /dev/null; then | |
| composer='composer.phar' | |
| else | |
| # Install composer | |
| curl -s http://getcomposer.org/installer | php > /dev/null | |
| composer='php composer.phar' | |
| fi | |
| # Install or update packages specified in the lock file | |
| $composer install --no-dev \ | |
| --classmap-authoritative \ | |
| --no-interaction | |
| fi | |
| # Migrate if necessary | |
| php artisan migrate --force \ | |
| --no-interaction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment