INNER CODE UNIT · PHP
UPDATE
wp-cli/wp-cli · utils/auto-composer-update.sh:27
UPDATE=$(cat vendor/update.log | col -b)
# We only care to proceed when there are changes
if [ -z "$(git status -s)" ]; then
echo 'No updates available'
exit 0;
fi
# Create a dated branch and commit the changes
DATE=$(date +%Y-%m-%d)
BRANCH="update-deps-$DATE"
git branch -f $BRANCH master
git checkout $BRANCH
git add .
MESSAGE="Update Composer dependencies ($DATE)
\`\`\`
$UPDATE