commit:     6081e79e5b9df5bf8b0d2bdbe5305cbe05c7ba48
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 22 17:16:03 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jun 22 18:01:31 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=6081e79e

Documentation: copy-to-main-tree.sh: Commit using pkgcommit

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 Documentation/maintainers/new/copy-to-main-tree.sh | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/Documentation/maintainers/new/copy-to-main-tree.sh 
b/Documentation/maintainers/new/copy-to-main-tree.sh
index da57010723..f4d7a87dad 100755
--- a/Documentation/maintainers/new/copy-to-main-tree.sh
+++ b/Documentation/maintainers/new/copy-to-main-tree.sh
@@ -1,6 +1,10 @@
 #!/bin/bash
 
-# Requires app-portage/repoman
+# Requires:
+# app-portage/repoman
+# Optional:
+# dev-vcs/git
+# app-portage/mgorny-dev-scripts
 
 . $(dirname "$0")/lib.sh
 
@@ -11,12 +15,13 @@ help() {
        echo Simple set-based ebuild copier.
        echo
        echo Given a set in the source repository, copies all ebuilds with the 
specified
-       echo version into the target repository.
+       echo version into the target repository. Optionally, if target is a git 
repository,
+       echo each ebuild will be committed as \"cat/pn: TARGETVERSION version 
bump\"
        echo
        echo Reads TARGET_REPO from your enviroment, defaulting to the current 
directory.
        echo
        echo Usage: copy-to-main-tree.sh SETNAME TARGETVERSION
-       echo Example: copy-to-main-tree.sh kde-frameworks-5.15 5.15.0
+       echo Example: copy-to-main-tree.sh kde-frameworks-5.72 5.72.0
        exit 0
 }
 
@@ -56,3 +61,14 @@ for cp in ${packages} ; do
        popd > /dev/null
 
 done
+
+if [[ -d "${TARGET_REPO}/.git" ]] && hash git 2>/dev/null && hash pkgcommit 
2>/dev/null; then
+       for cp in ${packages} ; do
+               pushd "${TARGET_REPO}/${cp}" > /dev/null
+
+               git add .
+               pkgcommit -sS . -m "${TARGETVERSION} version bump"
+
+               popd > /dev/null
+       done
+fi

Reply via email to