From bb95ed0110cc28c00a17799f5c976ed8ab0ab473 Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Tue, 16 Jan 2024 18:01:35 -0600 Subject: feat(git): add bump subcommand --- git/.local/bin/git-bump | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 git/.local/bin/git-bump diff --git a/git/.local/bin/git-bump b/git/.local/bin/git-bump new file mode 100755 index 0000000..d75a755 --- /dev/null +++ b/git/.local/bin/git-bump @@ -0,0 +1,27 @@ +#!/bin/sh + +tag="$(git describe --abbrev=0 2>/dev/null)" +IFS=. read -r major minor patch <&2 + exit 1 + ;; +esac + +git shortlog "$tag"..HEAD | git tag -s "v${major}.${minor}.${patch}" --file - -- cgit v1.2.3-70-g09d2