summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-24 16:20:22 (GMT)
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-24 16:34:51 (GMT)
commit312e84f5061782ca4851c3667fc2ac941140835d (patch)
treec13e73c1d9a05086ec4b51cbf97e9c51c9dba652 /scripts
parent313234e1e6f59ed8dfa4f0a11d0b91aab2d33c34 (diff)
downloaddefinitions-312e84f5061782ca4851c3667fc2ac941140835d.tar.gz
Chmod uploaded files
Suggested-by: Sam Thursfield
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release-upload19
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/release-upload b/scripts/release-upload
index 773ba68..2e7f54e 100755
--- a/scripts/release-upload
+++ b/scripts/release-upload
@@ -281,7 +281,11 @@ class BuildArtifactPublisher(object):
self.settings['public-trove-username'],
self.settings['public-trove-host'],
self.settings['public-trove-artifact-dir'])
-
+ set_permissions_on_server(
+ self.settings['public-trove-username'],
+ self.settings['public-trove-host'],
+ self.settings['public-trove-artifact-dir'],
+ basenames)
class ReleaseArtifactPublisher(object):
@@ -323,6 +327,11 @@ class ReleaseArtifactPublisher(object):
self.settings['download-server-username'],
self.settings['download-server-address'],
path)
+ set_permissions_on_server(
+ self.settings['download-server-username'],
+ self.settings['download-server-address'],
+ path,
+ files)
def move_release_artifacts_to_public_dir(self, files):
self.status(msg='Move release artifacts to public directory')
@@ -367,4 +376,12 @@ def rsync_files_to_server(
cliapp.runcmd(argv, feed_stdin=files_list, stdout=None, stderr=None)
+def set_permissions_on_server(user, host, target_dir, filenames):
+ target = '{user}@{host}'.format(user=user, host=host)
+ argv = ['chmod', '0644']
+ for filename in filenames:
+ argv.append(os.path.join(target_dir, filename))
+ cliapp.ssh_runcmd(target, argv)
+
+
ReleaseUploader(description=__doc__).run()