Created
November 1, 2017 13:19
-
-
Save ahmadawais/b17ebcddbf4f3cb5dff36e9df2e38082 to your computer and use it in GitHub Desktop.
WP: Create WordPress Core Patch via Command Line
This file contains 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
# Create a DIff/patch. | |
function wpcp() { | |
if [[ "-h" == "$1" ]]; then | |
echo "-" | |
echo "${wb}${bf}———————————————— Help! ————————————————${r}" | |
echo "${wb}${bf}————————————————-------————————————————${r}" | |
echo "${wb}${bf}——— Usage: wpcp ———${r}" | |
echo "-" | |
return 1 | |
else | |
echo "-" | |
echo "${wb} ${bf}--------------- ⏲ START: Let's create a patch... ---------------${r}" | |
echo "-" | |
wpcore | |
echo "-" | |
echo "—————————————————————————————" | |
echo "${wb} ${bf}➤ Ticket # (3456 or 3456.1):${r}" | |
echo "—————————————————————————————" | |
read -r WPC_PATCH_NAME | |
git diff -- . ':(exclude)Gruntfile.js' > $WPC_PATCH_NAME.diff | |
echo "-" | |
echo "${gb} ${bf}--------------- ✔︎✔︎✔︎ DONE!!! "$WPC_PATCH_NAME".diff Created! 💯 🎉 ✔✔✔ ---------------${r}" | |
echo "-" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment