diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-10 12:32:48 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-10 12:41:25 +0100 |
| commit | 63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch) | |
| tree | 41cd5d2d1ec36e74e464caab722cc9b460153f04 /bin/git-commit-bump | |
| parent | 5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff) | |
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/git-commit-bump')
| -rwxr-xr-x | bin/git-commit-bump | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/bin/git-commit-bump b/bin/git-commit-bump deleted file mode 100755 index e3e3300..0000000 --- a/bin/git-commit-bump +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -set -e -[ -n "$DEBUG" ] && set -x - -if [ "$1" = "-h" ]; then - echo "usage: $(basename "${0}") DEPENDENCY [from] TO" - echo - exit 0 -fi - -dependency=$1 -from=$2 -to=$3 - -if [ -z "${dependency}" ]; then - echo "error: missing dependency to bump, see -h" >&2 - exit 1 -fi - -if [ -z "${to}" ]; then - to=$from - from=$(git log --format=%b | awk "{ if(match(\$0,/[Uu]pdate ${dependency} from (.+) to (.+)$/,m)) print(m[2]); exit(0) }") - if [ -z "${from}" ]; then - # still no $from, let's give the user a choice using fzf - from=$(git log --format=%b | awk "{ if(match(\$0,/[Uu]pdate (.+) from (.+) to (.+)$/,m)) print m[0] }" | fzf | sed 's#.*to \(.*\)$#\1#') - fi -fi - -if [ -z "${to}" ]; then - echo "error: missing version to bump to, see -h" >&2 - exit 1 -fi - -git commit --edit --file <( - cat <<-EOF - Update ${dependency} to ${to} - - Update ${dependency} from ${from} to ${to} - - Change-type: patch - Signed-off-by: $(git config user.name) $(git config user.signemail || git config user.email) - EOF -) |