aboutsummaryrefslogtreecommitdiff
path: root/repo/git/kiss-rel
diff options
context:
space:
mode:
Diffstat (limited to 'repo/git/kiss-rel')
-rwxr-xr-xrepo/git/kiss-rel16
1 files changed, 16 insertions, 0 deletions
diff --git a/repo/git/kiss-rel b/repo/git/kiss-rel
new file mode 100755
index 0000000..ae76c6e
--- /dev/null
+++ b/repo/git/kiss-rel
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Bump the release number of a package
+
+case "$1" in --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac
+
+read -r ver rel < version || {
+ printf '%s\n' "could not find version file, are you on a package directory?"
+ exit 1
+}
+
+# Update the version file with the new release number
+printf '%s\n' "$ver $(( rel += 1 ))" > version
+
+# Unstage all changes and add the version file
+git reset; git add version
+git commit -m "${PWD##*/}: bump release number"