From d804bc7dda6d6831aa9c9559ad66d7a81614ec82 Mon Sep 17 00:00:00 2001 From: Mark Langsdorf Date: Mar 12 2020 12:48:33 +0000 Subject: cli: additional warnings when using --release with container-build Fixes OSBS-7094 Add an additional warning when using --release with container-build that the results may not be intented and that --target should be used instead. Signed-off-by: Mark Langsdorf --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 5f3058b..f0ba9d4 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -2020,6 +2020,12 @@ class cliClient(object): self.cmd._target = self.args.target target_override = True + if self.args.release: + self.log.warning('using --release with container-build will cause git_branch to be ' + 'overridden, and if the specified commit is not present in the ' + 'overridden branch, the build will fail. Use --target to avoid ' + 'this behavior') + opts = {"scratch": self.args.scratch, "quiet": self.args.q, "release": self.args.build_release,