Created
September 4, 2015 23:00
-
-
Save DuaelFr/9a1185ffccd0b539145d to your computer and use it in GitHub Desktop.
Script to generate patches for updating all drupal core dependencies
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
cd core; for dep in `composer info -iN`; do composer update $dep; git add -A .; git diff -M --cached > update-dep--${dep//\//--}.patch; git reset HEAD .; git checkout .; git clean -fd .; done; find . -size 0 -name "update-dep--*.patch" -exec rm -r {} \; |
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
#!/bin/bash | |
cd core | |
for dep in `composer info -iN` | |
do | |
# Update dependency. | |
composer update $dep | |
# Make the patch. | |
git add -A . | |
git diff -M --cached > update-dep--${dep//\//--}.patch | |
# Clean up for the next round | |
git reset HEAD . | |
git checkout . | |
git clean -fd . | |
done | |
# Clean up empty patches for dependencies that have not been updated. | |
find . -size 0 -name "update-dep--*.patch" -exec rm -r {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment