From a7803ea66f7e0d05fc8393bef622d206bcad94de Mon Sep 17 00:00:00 2001 From: Luiz Carvalho Date: May 31 2016 00:35:57 +0000 Subject: Add support for BuildContainer release task opt Signed-off-by: Luiz Carvalho --- diff --git a/src/pyrpkg/cli.py b/src/pyrpkg/cli.py index 3be4db2..c44b590 100755 --- a/src/pyrpkg/cli.py +++ b/src/pyrpkg/cli.py @@ -853,6 +853,7 @@ see API KEY section of copr-cli(1) man page. koji_group.add_argument('--scratch', help='Scratch build', action="store_true") + koji_group.add_argument('--release', help='Set release value') self.container_build_parser.add_argument('--target', help='Override the default target', @@ -1074,6 +1075,9 @@ see API KEY section of copr-cli(1) man page. "quiet": self.args.q, "yum_repourls": self.args.repo_url} + if hasattr(self.args, "release") and self.args.release: + opts["release"] = self.args.release + section_name = "%s.container-build" % self.name err_msg = "Missing {option} option in [{plugin.section}] section. "\ "Using {option} from [{root.section}]" diff --git a/src/rpkg.bash b/src/rpkg.bash index d89568e..d743c20 100644 --- a/src/rpkg.bash +++ b/src/rpkg.bash @@ -29,12 +29,12 @@ _rpkg() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" fi - + # global options local options="--help -v -q" local options_value="--dist --user --path" - local commands="build chain-build ci clean clog clone co container-build-config commit compile copr-build diff gimmespec giturl help \ + local commands="build chain-build ci clean clog clone co container-build container-build-config commit compile copr-build diff gimmespec giturl help \ gitbuildhash import install lint local mockbuild mock-config new new-sources patch prep pull push scratch-build sources \ srpm switch-branch tag unused-patches upload verify-files verrel" @@ -120,6 +120,11 @@ _rpkg() options_branch="-b" after="package" ;; + container-build) + options="--scratch --nowait" + options_target="--target" + options_string="--release --repo-url" + ;; container-build-config) options="--get-autorebuild" options_bool="--set-autorebuild"