Last active
August 20, 2020 10:10
-
-
Save Voles/67915110ee4fa49ca61482fd4900203f to your computer and use it in GitHub Desktop.
Bump patch file and push to origin
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
#!/usr/bin/env bash | |
bp () { | |
git fetch | |
latestTag=$(git tag | tail -n1) | |
versionParts=($(echo "$latestTag" | tr '.' '\n')) | |
newTag="${versionParts[1]}.${versionParts[2]}.$(($versionParts[3] + 1))" | |
echo "new patch version is: $newTag" | |
git tag $newTag | |
git push origin $newTag | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment