We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9ce635 commit ba811e7Copy full SHA for ba811e7
scripts/bump.sh
@@ -0,0 +1,21 @@
1
+#!/bin/sh
2
+
3
+set -e
4
5
+version=$(git describe --tags --abbrev=0 | sed 's/^v//')
6
+IFS='.' read -r major minor patch <<EOF
7
+$version
8
+EOF
9
10
+case "$1" in
11
+ major) major=$((major + 1)); minor=0; patch=0 ;;
12
+ minor) minor=$((minor + 1)); patch=0 ;;
13
+ patch) patch=$((patch + 1)) ;;
14
+ *) echo "Usage: $0 {major|minor|patch}"; exit 1 ;;
15
+esac
16
17
+new_tag="v$major.$minor.$patch"
18
+git commit --allow-empty -m "chore: bump version to $new_tag"
19
+git tag "$new_tag"
20
+git push origin HEAD "$new_tag"
21
+echo "Bumped to $new_tag"
0 commit comments