Followup fix for bug 454594 (need a makefile target that can upload files via ssh). r=bsmedberg, NPOB
authorTed Mielczarek <ted.mielczarek@gmail.com>
Thu, 13 Nov 2008 17:50:27 +0100
changeset 21615 b9926411d750d5803770c64290d54844802a6eea
parent 21614 4abab345610973f1f9e6708b4e87633f0ffef642
child 21616 c299c47ffbc73d8339f12f72ff28bca00944b4e2
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, NPOB
bugs454594
milestone1.9.1b2pre
Followup fix for bug 454594 (need a makefile target that can upload files via ssh). r=bsmedberg, NPOB
build/upload.py
--- a/build/upload.py
+++ b/build/upload.py
@@ -165,21 +165,22 @@ def UploadFiles(user, host, path, files,
         DoSSHCommand('%s "%s" %s' % (post_upload_command, path, file_list), user, host, port=port, ssh_key=ssh_key)
     if verbose:
         print "Upload complete"
 
 if __name__ == '__main__':
     host = RequireEnvironmentVariable('UPLOAD_HOST')
     user = RequireEnvironmentVariable('UPLOAD_USER')
     path = RequireEnvironmentVariable('UPLOAD_PATH')
-    if sys.platform == 'win32':
-        path = FixupMsysPath(path)
     port = int(OptionalEnvironmentVariable('UPLOAD_PORT'))
     key = OptionalEnvironmentVariable('UPLOAD_SSH_KEY')
     post_upload_command = OptionalEnvironmentVariable('POST_UPLOAD_CMD')
+    if sys.platform == 'win32':
+        path = FixupMsysPath(path)
+        post_upload_command = FixupMsysPath(post_upload_command)
 
     parser = OptionParser(usage="usage: %prog [options] <files>")
     parser.add_option("-b", "--base-path",
                       action="store", dest="base_path",
                       help="Preserve file paths relative to this path when uploading. If unset, all files will be uploaded directly to UPLOAD_PATH.")
     (options, args) = parser.parse_args()
     if len(args) < 1:
         print "You must specify at least one file to upload"