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

Only perform a debug PyInstaller build if the '--debug' flag is set

This commit is contained in:
Raoul Snyman 2016-12-15 17:20:00 +02:00
parent c5654e4256
commit eece48fb3d

View File

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