[packages/rpm-build-tools/merge-pld-builder-client: 132/2675] - allow sending post command after build
glen
glen at pld-linux.org
Mon Dec 19 22:00:00 CET 2016
commit 009fcd365641a8f0e898ae06247c8510f4a89ce1
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Tue Mar 15 20:51:54 2011 +0000
- allow sending post command after build
Changed files:
client/make-request.sh -> 1.92
make-request.sh | 34 +++++++++++++++++++++++++++++-----
1 file changed, 29 insertions(+), 5 deletions(-)
---
diff --git a/make-request.sh b/make-request.sh
index 8ec26b2..5a1f0b0 100644
--- a/make-request.sh
+++ b/make-request.sh
@@ -147,7 +147,7 @@ Usage: make-request.sh [OPTION] ... [SPECFILE] ....
Mandatory arguments to long options are mandatory for short options too.
- -C, --config-file /path/to/config/file
+ --config-file /path/to/config/file
Source additional config file (after $USER_CFG), useful when
when sending build requests to Ac/Th from the same account
-b 'BUILDER BUILDER ...', --builder='BUILDER BUILDER ...'
@@ -186,7 +186,9 @@ Mandatory arguments to long options are mandatory for short options too.
-cf, --command-flag
Not yet documented
-c, --command
- Executes a given command on builders
+ Executes a given command on builders (prepended to build jobs if build jobs included)
+ -C, --post-command
+ Executes a given command on builders (appended to build jobs if build jobs included)
--test-remove-pkg
shortcut for --command poldek -evt ARGS
--remove-pkg
@@ -217,8 +219,8 @@ while [ $# -gt 0 ] ; do
shift
;;
- --config-file | -C)
- [ -f $2 ] && . $2 || die "Config file not found"
+ --config-file)
+ [ -f "$2" ] && . $2 || die "Config file not found"
shift
;;
@@ -314,7 +316,16 @@ while [ $# -gt 0 ] ; do
command=$(cat)
echo >&2 "---"
fi
- f_upgrade=no
+ shift
+ ;;
+ --post-command | -C)
+ post_command="$2"
+ if [ "$post_command" = - ]; then
+ echo >&2 "Reading post_command from STDIN"
+ echo >&2 "---"
+ post_command=$(cat)
+ echo >&2 "---"
+ fi
shift
;;
--test-remove-pkg)
@@ -634,6 +645,19 @@ gen_req() {
depend=$bid
done
+ if [ "$post_command" ]; then
+ bid=$(uuidgen)
+ echo -E >&2 "* Post-Command: $post_command"
+ echo " <batch id='$bid' depends-on='$depend'>"
+ echo " <command flags='$command_flags'>"
+ echo -E "$post_command" | sed -e 's,&,\&,g;s,<,\<,g;s,>,\>,g'
+ echo "</command>"
+ echo " <info></info>"
+ echo "$builders_xml"
+ echo " </batch>"
+ depend=$bid
+ fi
+
echo "</group>"
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cca6584b96e6c33d0732d559e43e100d804e2ecd
More information about the pld-cvs-commit
mailing list