Skip to content

Instantly share code, notes, and snippets.

View Voles's full-sized avatar

Niels Dequeker Voles

  • Belgium
  • 09:19 (UTC +02:00)
View GitHub Profile
@Voles
Voles / bump-patch.sh
Last active August 20, 2020 10:10
Bump patch file and push to origin
#!/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"