diff options
-rw-r--r-- | README.md | 5 | ||||
-rwxr-xr-x | git-vc | 10 |
2 files changed, 11 insertions, 4 deletions
@@ -7,6 +7,9 @@ git-obranch git-oci : prepare commit message from `*.changes` file +git-vc +: generate new record in *.changes file from the list of commits between the current and the last version of the SPEC file. + goscb : (probably not needed, when the checkout is primed with `git-obranch`) run `osc build` without regards if `.osc/` directory exists @@ -19,4 +22,4 @@ git-which-tag.sh All issues, questions, complaints, or (even better!) patches should be send via email to [~mcepl/devel@lists.sr.ht](mailto:~mcepl/devel@lists.sr.ht) email -list (for patches use [git send-email](https://git-send-email.io/)).
\ No newline at end of file +list (for patches use [git send-email](https://git-send-email.io/)). @@ -4,13 +4,17 @@ set -eu EDITOR=${EDITOR:-vi} REPO="$(basename "$(readlink -f .)")" -BEFORE=$(git diff --color=never|awk -F. '/^-Version/ {print $NF}') +if [ "$#" -gt 0 ] ; then + BEFORE="$1" +else + BEFORE=$(git diff --color=never|awk -F. '/^-Version/ {print $NF}') +fi AFTER=$(git diff --color=never|awk -F. '/^+Version/ {print $NF}') -[ -z "$BEFORE" -o -z "$AFTER" ] && exit 0 +[ -z "$BEFORE" ] || [ "$AFTER" ] && exit 0 cd "$REPO" CHGLOG="$(git log --pretty='format: - %s' "$BEFORE..$AFTER")" cd .. osc vc -m "Update from $BEFORE to $AFTER:\n$CHGLOG" -$EDITOR *.changes +$EDITOR ./*.changes |