1
0
mirror of https://gitlab.com/openlp/packaging.git synced 2024-12-22 13:02:50 +00:00

Make debug mode explicit.

bzr-revno: 34
This commit is contained in:
Raoul Snyman 2016-12-15 17:53:07 +02:00
commit 507c43d547

View File

@ -159,6 +159,7 @@ class Builder(object):
help='Do NOT update the branch before building')
parser.add_argument('--skip-translations', action='store_true', default=False,
help='Do NOT update the language translation files')
parser.add_argument('--debug', action='store_true', default=False, help='Create a debug build')
self.add_extra_args(parser)
self.args = parser.parse_args()
@ -232,7 +233,7 @@ class Builder(object):
self._print_verbose(' {:.<20} {}'.format('build path: ', self.build_path))
self._print_verbose('Overrides:')
self._print_verbose(' {:.<20} {}'.format('branch **: ', self.branch_path))
self._print_verbose(' {:.<20} {}'.format('documentation **: ', self.branch_path))
self._print_verbose(' {:.<20} {}'.format('documentation **: ', self.documentation_path))
self._print_verbose(' {:.<20} {}'.format('version: ', self.version))
self._print_verbose(' {:.<20} {}'.format('work path: ', self.work_path))
@ -279,11 +280,11 @@ class Builder(object):
'-i', self.icon_path,
'-n', 'OpenLP',
self.openlp_script]
if not self.args.verbose:
cmd.append('--log-level=ERROR')
else:
if self.args.verbose:
cmd.append('--log-level=DEBUG')
if not self.args.release:
else:
cmd.append('--log-level=ERROR')
if self.args.debug:
cmd.append('-d')
self._print_verbose('... {}'.format(' '.join(cmd)))
output, error = self._run_command(cmd, 'Error running PyInstaller')