mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-22 04:52:50 +00:00
Merge branch 'make-release-export-optional' into 'master'
Make the export optional when running a release build See merge request openlp/packaging!6
This commit is contained in:
commit
83da7f600f
@ -149,6 +149,8 @@ class Builder(object):
|
|||||||
parser.add_argument('-b', '--branch', metavar='PATH', help='Specify the path to the branch you wish to build')
|
parser.add_argument('-b', '--branch', metavar='PATH', help='Specify the path to the branch you wish to build')
|
||||||
parser.add_argument('-r', '--release', metavar='VERSION', default=None,
|
parser.add_argument('-r', '--release', metavar='VERSION', default=None,
|
||||||
help='Build a release version of OpenLP with the version specified')
|
help='Build a release version of OpenLP with the version specified')
|
||||||
|
parser.add_argument('-x', '--export', dest='can_export', action='store_true', default=False,
|
||||||
|
help='Export when building a release. Defaults to false, ignored for non-release builds')
|
||||||
parser.add_argument('-d', '--documentation', metavar='PATH', default=None,
|
parser.add_argument('-d', '--documentation', metavar='PATH', default=None,
|
||||||
help='Specify the path to the documentation branch')
|
help='Specify the path to the documentation branch')
|
||||||
parser.add_argument('-t', '--update-translations', action='store_true', default=False,
|
parser.add_argument('-t', '--update-translations', action='store_true', default=False,
|
||||||
@ -214,9 +216,11 @@ class Builder(object):
|
|||||||
self.documentation_path = os.path.abspath(self.args.documentation)
|
self.documentation_path = os.path.abspath(self.args.documentation)
|
||||||
if self.args.release:
|
if self.args.release:
|
||||||
self.version = self.args.release
|
self.version = self.args.release
|
||||||
self.work_path = os.path.abspath(os.path.join(self.branch_path, '..', 'OpenLP-' + self.version))
|
|
||||||
else:
|
else:
|
||||||
self.version = None
|
self.version = None
|
||||||
|
if self.args.release and self.args.can_export:
|
||||||
|
self.work_path = os.path.abspath(os.path.join(self.branch_path, '..', 'OpenLP-' + self.version))
|
||||||
|
else:
|
||||||
self.work_path = self.branch_path
|
self.work_path = self.branch_path
|
||||||
self.openlp_script = os.path.abspath(os.path.join(self.work_path, 'openlp', '__main__.py'))
|
self.openlp_script = os.path.abspath(os.path.join(self.work_path, 'openlp', '__main__.py'))
|
||||||
self.source_path = os.path.join(self.work_path, 'openlp')
|
self.source_path = os.path.join(self.work_path, 'openlp')
|
||||||
@ -492,7 +496,7 @@ class Builder(object):
|
|||||||
self._print_verbose('')
|
self._print_verbose('')
|
||||||
if not self.args.skip_update:
|
if not self.args.skip_update:
|
||||||
self.update_code()
|
self.update_code()
|
||||||
if self.args.release:
|
if self.args.release and self.args.can_export:
|
||||||
self.export_release()
|
self.export_release()
|
||||||
self.run_pyinstaller()
|
self.run_pyinstaller()
|
||||||
self.write_version_file()
|
self.write_version_file()
|
||||||
|
Loading…
Reference in New Issue
Block a user