##// END OF EJS Templates
Merge pull request #10831 from Carreau/protect-upload...
Thomas Kluyver -
r24023:36b8f2ac merge
parent child Browse files
Show More
@@ -6,6 +6,7 This should ONLY be run at real release time.
6 from __future__ import print_function
6 from __future__ import print_function
7
7
8 import os
8 import os
9 from glob import glob
9 from subprocess import call
10 from subprocess import call
10 import sys
11 import sys
11
12
@@ -49,9 +50,10 cd(tooldir)
49
50
50 if 'upload' in sys.argv:
51 if 'upload' in sys.argv:
51 cd(distdir)
52 cd(distdir)
52 #print( 'Uploading distribution files to GitHub...')
53
53
54 for fname in os.listdir('.'):
54 # do not upload OS specific files like .DS_Store
55 to_upload = glob('*.whl')+glob('*.tar.gz')
56 for fname in to_upload:
55 # TODO: update to GitHub releases API
57 # TODO: update to GitHub releases API
56 continue
58 continue
57 print('uploading %s to GitHub' % fname)
59 print('uploading %s to GitHub' % fname)
@@ -61,7 +63,7 if 'upload' in sys.argv:
61 # Make target dir if it doesn't exist
63 # Make target dir if it doesn't exist
62 print('1. Uploading IPython to archive.ipython.org')
64 print('1. Uploading IPython to archive.ipython.org')
63 sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version))
65 sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version))
64 sh('scp * %s' % release_site)
66 sh('scp *.tar.gz *.whl %s' % release_site)
65
67
66 print('2. Uploading backup files...')
68 print('2. Uploading backup files...')
67 cd(ipbackupdir)
69 cd(ipbackupdir)
@@ -69,7 +71,7 if 'upload' in sys.argv:
69
71
70 print('3. Uploading to PyPI using twine')
72 print('3. Uploading to PyPI using twine')
71 cd(distdir)
73 cd(distdir)
72 call(['twine', 'upload'] + os.listdir('.'))
74 call(['twine', 'upload'] + to_upload)
73
75
74 else:
76 else:
75 # Build, but don't upload
77 # Build, but don't upload
General Comments 0
You need to be logged in to leave comments. Login now