Skip to content

Instantly share code, notes, and snippets.

@Hounddog
Created June 12, 2012 10:08
Show Gist options
  • Save Hounddog/2916711 to your computer and use it in GitHub Desktop.
Save Hounddog/2916711 to your computer and use it in GitHub Desktop.
Shell script to find if composer.lock has changed
#!/bin/sh
################################################################################
#
# Script to determine if composer.lock is updated through git and run an update
#
###############################################################################
diff=`git diff origin/master composer.lock`
echo 'Checking for Dependency Updates'
if [ -z "$diff" ];
then
echo 'Nothing to Update'
else
echo 'Updating Dependencies'
php composer.phar install --dev
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment