Created
May 14, 2018 09:46
-
-
Save LeonardoCardoso/bba645d3ffbdb3f52c64bbc7cf8fa70f to your computer and use it in GitHub Desktop.
Update version on your project using a single command
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
function updateversion() { | |
OLD="$1" | |
NEW="$2" | |
grep -rl "$OLD" . --exclude-dir={"Build","libs","Pods",".git"} --exclude={"Podfile.lock","CHANGELOG.md","update-version.sh"} | xargs sed -i.bak "s/$OLD/$NEW/g"; | |
find . -type f -name '*.bak' -delete | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
updateversion "1\.0\.0" "1\.0\.1"