about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README1
-rwxr-xr-xxbump10
2 files changed, 11 insertions, 0 deletions
diff --git a/README b/README
index 6905cf7..b86915f 100644
--- a/README
+++ b/README
@@ -5,6 +5,7 @@ https://github.com/voidlinux/xbps
 
   gensum [-i] TEMPLATE - update SHA256 sums in templates
   mindep PKGS... - minimize list of PKGS by removing implicit dependencies
+  xbump PKGNAME [git commit options] - git commit a version bump
   xdiff [DIR] - merge XBPS .new-* files
   xgrep PATTERN PKGS... - search files limited to XBPS package contents
   xlg PKG - open short commit log for XBPS template
diff --git a/xbump b/xbump
new file mode 100755
index 0000000..e970a19
--- /dev/null
+++ b/xbump
@@ -0,0 +1,10 @@
+#!/bin/sh
+# xbump PKGNAME [git commit options] - git commit a version bump
+
+cd ~/xbps-packages
+
+pkg=$1; shift
+version=$(./xbps-src show "$pkg" | sed -n '/version/s/[^:]*:[\t]*//p')
+
+git add srcpkgs/"$pkg" &&
+git commit -m "$pkg: update to $version." "$@" srcpkgs/"$pkg"