##// END OF EJS Templates
add GitHub uploads to release script
MinRK -
Show More
@@ -1,64 +1,70 b''
1 1 #!/usr/bin/env python
2 2 """IPython release script.
3 3
4 4 This should ONLY be run at real release time.
5 5 """
6 6 from __future__ import print_function
7 7
8 8 from toollib import *
9 from gh_api import post_download
9 10
10 11 # Get main ipython dir, this will raise if it doesn't pass some checks
11 12 ipdir = get_ipdir()
12 13 tooldir = pjoin(ipdir, 'tools')
13 14 distdir = pjoin(ipdir, 'dist')
14 15
15 16 # Where I keep static backups of each release
16 17 ipbackupdir = os.path.expanduser('~/ipython/backup')
17 18
18 19 # Start in main IPython dir
19 20 cd(ipdir)
20 21
21 22 # Load release info
22 23 execfile(pjoin('IPython','core','release.py'))
23 24
24 25 # Build site addresses for file uploads
25 26 release_site = '%s/release/%s' % (archive, version)
26 27 backup_site = '%s/backup/' % archive
27 28
28 29 # Start actual release process
29 30 print()
30 31 print('Releasing IPython')
31 32 print('=================')
32 33 print()
33 34 print('Version:', version)
34 35 print()
35 36 print('Source IPython directory:', ipdir)
36 37 print()
37 38
38 39 # Perform local backup, go to tools dir to run it.
39 40 cd(tooldir)
40 41 sh('./make_tarball.py')
41 42 sh('mv ipython-*.tgz %s' % ipbackupdir)
42 43
43 44 # Build release files
44 45 sh('./build_release %s' % ipdir)
45 46
46 47 # Register with the Python Package Index (PyPI)
47 48 print( 'Registering with PyPI...')
48 49 cd(ipdir)
49 50 sh('./setup.py register')
50 51
51 52 # Upload all files
52 53 sh(sdists + ' upload')
53 54 cd(distdir)
54 55 print( 'Uploading distribution files...')
55 56
57 for fname in os.listdir('.'):
58 print('uploading %s to GitHub' % fname)
59 desc = "IPython %s source distribution" % version
60 post_download("ipython/ipython", fname, description=desc)
61
56 62 # Make target dir if it doesn't exist
57 63 sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version))
58 64 sh('scp * %s' % release_site)
59 65
60 66 print( 'Uploading backup files...')
61 67 cd(ipbackupdir)
62 68 sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site)
63 69
64 70 print('Done!')
General Comments 0
You need to be logged in to leave comments. Login now