Created
August 17, 2020 21:15
-
-
Save amiad/9a467647f87ab51cfc973a4752953a05 to your computer and use it in GitHub Desktop.
Update Wordpress version in readme of all plugins
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
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "version missed!" | |
exit 0 | |
fi | |
plugins="ligery wordpress-hebrew-date en-spam" | |
plugindir="/home/plugins" | |
for plugin in $plugins; do | |
pushd $plugindir/$plugin > /dev/null | |
last=$(ls tags | tail -1) | |
dirs="trunk tags/$last" | |
for dir in $dirs; do | |
sed -i "s/Tested up to: [0-9.]*/Tested up to: 5.5/" "$dir/readme.txt" | |
svn add "$dir/readme.txt" | |
echo "$dir/readme.txt updated!" | |
if [ -f "$dir/README.md" ]; then | |
sed -i 's/\*\*Tested up to:\*\* [0-9.]*/\*\*Tested up to:\*\* $1/' "$dir/README.md" | |
svn add "$dir/README.md" | |
echo "$dir/README.md updated!" | |
fi | |
done | |
svn ci -m "update to $1" | |
echo "$plugin updated!!!" | |
popd > /dev/null | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment