Created
October 26, 2017 10:21
-
-
Save victorlapshev/a6e3cad5bc0993d3bc2ea0e6e094cdb1 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 | |
| putenv('COMPOSER_HOME=/home/bitrix/.composer/'); | |
| $commands = [ | |
| 'git add --all', | |
| 'git commit -m "Changes on production"', | |
| 'git pull origin master', | |
| 'git checkout --theirs .', | |
| 'git commit -am "Remote Conflict"', | |
| 'git push origin master', | |
| '(cd local && composer update --no-dev --no-progress)', // update composer requirements | |
| 'rm -rf bitrix/cache/maximaster/tools.twig' // kill twig cache | |
| ]; | |
| foreach($commands AS $command){ | |
| $tmp = shell_exec($command." 2>&1 "); | |
| echo '<b>' . $command . '</b>' . PHP_EOL; | |
| echo htmlentities(trim($tmp)) . PHP_EOL . PHP_EOL; | |
| } | |
| ?> | |
| </pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment