From 695530d8ae029a56e0ed206d0030a6baf40e7cb5 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 15 Aug 2008 16:38:46 +0000 Subject: [PATCH] no more ftp too... sftp now git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5694 212acab6-be3b-0410-9dea-997c60f758d6 --- Scripts/release.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Scripts/release.py b/Scripts/release.py index 90b864d9..83411ad5 100644 --- a/Scripts/release.py +++ b/Scripts/release.py @@ -28,6 +28,9 @@ ZIP="C:\Program Files\7-zip\7za.exe" a -tzip %s -mx9 -mfb=255 -mpass=4 %s [rsh] RSH="C:\Program Files\PuTTY\plink.exe" -2 -l kichik nsis.sourceforge.net +[sftp] +SFTP="C:\Program Files\PuTTY\psftp.exe" -2 -l kichik -batch -b %s frs.sourceforge.net + [wiki] UPDATE_URL=http://nsis.sourceforge.net/Special:Simpleupdate?action=raw @@ -58,7 +61,6 @@ import sys import time import Image, ImageFont, ImageDraw from ConfigParser import ConfigParser -from ftplib import FTP import time import pysvn @@ -84,6 +86,8 @@ ZIP = cfg.get('compression', 'ZIP') RSH = cfg.get('rsh', 'RSH') +SFTP = cfg.get('sftp', 'SFTP') + PURGE_URL = cfg.get('wiki', 'PURGE_URL') UPDATE_URL = cfg.get('wiki', 'UPDATE_URL') @@ -362,20 +366,21 @@ def CreateSpecialBuilds(): def UploadFiles(): print 'uploading files to SourceForge...' - def upload(ftp, file): - print ' uploading %s...' % file - ftp.storbinary('STOR /incoming/%s' % file.split('\\')[-1], open(file, 'rb')) + sftpcmds = file('sftp-commands', 'wb') + sftpcmds.write('cd uploads') + sftpcmds.write('put %s.tar.bz2\n' % newverdir) + sftpcmds.write('put %s\\nsis-%s-setup.exe\n' % (newverdir, VERSION)) + sftpcmds.write('put %s\\nsis-%s.zip\n' % (newverdir, VERSION)) + sftpcmds.write('put nsis-%s-log.zip\n' % VERSION) + sftpcmds.write('put nsis-%s-strlen_8192.zip\n' % VERSION) - ftp = FTP('upload.sourceforge.net') - ftp.login() + run( + SFTP % 'sftp-commands', + LOG_ALL, + 'upload failed' + ) - upload(ftp, newverdir + '.tar.bz2') - upload(ftp, newverdir + '\\nsis-%s-setup.exe' % VERSION) - upload(ftp, newverdir + '\\nsis-%s.zip' % VERSION) - upload(ftp, 'nsis-%s-log.zip' % VERSION) - upload(ftp, 'nsis-%s-strlen_8192.zip' % VERSION) - - ftp.quit() + os.unlink('sftp-commands') def ManualRelease(): print 'release url:'