summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-30 16:55:50 (GMT)
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-30 16:55:50 (GMT)
commit497334fd9c0190437cefa9f089537be0556e3d2d (patch)
tree25471ee8e721157ba43cc6c1ab13627c9ba11b86 /scripts
parent3d950f7787a2de5c0d495642f9337bd998f2edd7 (diff)
downloaddefinitions-497334fd9c0190437cefa9f089537be0556e3d2d.tar.gz
Add --upload-release-artifacts setting
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-upload22
1 files changed, 9 insertions, 13 deletions
diff --git a/scripts/release-upload b/scripts/release-upload
index d3cc39e..68de800 100755
--- a/scripts/release-upload
+++ b/scripts/release-upload
@@ -142,6 +142,11 @@ class ReleaseUploader(cliapp.Application):
default=[],
group=group)
+ self.settings.boolean(
+ ['upload-release-artifacts'],
+ 'upload release artifacts (disk images etc)?',
+ default=True)
+
def get_local_username(self):
uid = os.getuid()
return pwd.getpwuid(uid)[0]
@@ -152,23 +157,14 @@ class ReleaseUploader(cliapp.Application):
self.status).publish_build_artifacts()
self.status(msg='Build artifiacts have been published')
- RELEASE_OPTIONS = ('release-artifact-dir',
- 'download-server-username',
- 'download-server-address',
- 'download-server-private-dir',
- 'download-server-public-dir')
- missing_options = set(option for option in RELEASE_OPTIONS
- if self.settings[option] == '')
-
- if not missing_options:
+ if self.settings['upload-release-artifacts']:
ReleaseArtifactPublisher(self.settings,
self.status).publish_release_artifacts()
self.status(msg='Release images have been published')
else:
- self.status(msg='Not uploading release images: '
- 'options not provided: {options}',
- options=', '.join(missing_options))
-
+ self.status(
+ msg=('Not uploading release artifacts '
+ '(--upload-release-artifacts not set)'))
def status(self, msg, **kwargs):
formatted = msg.format(**kwargs)