Skip to content

Instantly share code, notes, and snippets.

@brianclogan
Last active August 16, 2016 22:44
Show Gist options
  • Save brianclogan/95ab4444aa5e68d09e4e330e2ae8f95b to your computer and use it in GitHub Desktop.
Save brianclogan/95ab4444aa5e68d09e4e330e2ae8f95b to your computer and use it in GitHub Desktop.

This is meant to go after the git pull statement in your deployment script.

It will only run composer update if composer is in the the commit message.

[ -f git-log.txt ] && rm git-log.txt
git log -1 --pretty=%B > git-log.txt
if grep -Fq 'composer' git-log.txt; then
composer update --no-interaction
fi
php artisan migrate --force
php artisan cache:clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment