cpt-extra

Extra utilities for cpt
git clone git://git.carbslinux.org/cpt-extra
Log | Files | Refs | README | LICENSE

commit a80ec35b458ad1616758aff8257d42b3b51ed17e
parent ae544a41ef41c2a4cf8ece0c0bed38726252e4b4
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat, 18 Jul 2020 23:07:15 +0300

kiss-rel: add support for bumping multiple packages at the same time

Diffstat:
Mrepo/git/kiss-rel | 30+++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/repo/git/kiss-rel b/repo/git/kiss-rel @@ -1,16 +1,24 @@ -#!/bin/sh +#!/bin/sh -e # Bump the release number of a package -case "$1" in --help|-h) printf '%s\n' "usage: ${0##*/}"; exit 0; esac +case "$1" in + '') set -- . ;; + --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 -} +for pkg; do ( -# Update the version file with the new release number -printf '%s\n' "$ver $(( rel += 1 ))" > version + cd "$pkg" -# Unstage all changes and add the version file -git reset; git add version -git commit -m "${PWD##*/}: bump release number" + 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" + +) done