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