-
-
Save clouddueling/6228614 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
<pre> | |
<?php | |
// ---------------------- CONFIG DETAILS ---------------------- | |
//branch in git | |
$BRANCH = 'master'; | |
// --------- You should not need to edit below here ------------ | |
$current_sha1 = `git rev-parse $BRANCH`; | |
$status_of_branch = `git ls-remote origin -h refs/heads/$BRANCH`; | |
if( strpos(trim($status_of_branch), trim($current_sha1)) !== false) { | |
echo "no changes on branch $BRANCH \n"; | |
return; | |
} | |
echo "Pulling\n"; | |
$pull = `git pull`; | |
echo ".\n"; | |
echo "Clearing Cache\n"; | |
// clear out storage/work and storage/views | |
echo ".\n"; | |
echo "Finished \n"; | |
echo "pull:". $pull , "\n"; | |
$sha1 = `git rev-parse $BRANCH`; | |
$changelog = `git log $BRANCH -1 --format="%s"`; | |
echo "sha1:". $sha1 , "\n"; | |
echo "changelog:".$changelog , "\n"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment