Last active
August 29, 2015 14:23
-
-
Save oliverlundquist/eca2c1fa5b1ca6f5758c to your computer and use it in GitHub Desktop.
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
tag_my_repo() { | |
find ~/repositories/oliverlundquist/repotest -type d -maxdepth 1 -mindepth 1 | | |
xargs -I '{}' bash -c ' | |
PATH="$1" | |
VERSION="$2" | |
cd $PATH | |
git pull | |
if [[ -z $(git -C $PATH status -s) ]] | |
then | |
sed -i "" "s/0.4.0/0.5.0/g" package.json | |
sed -i "" "s/0.4.0/0.5.0/g" bower.json | |
git commit -m "version bump" | |
git push | |
git tag -a 0.5.0 -m "0.5.0 release" | |
git push --tags | |
echo "tagged repo" | |
else | |
echo "cannot git tag no" | |
fi | |
' - '{}' "$1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment