~ellisonbg/ipython/bugfixes0411409

« back to all changes in this revision

Viewing changes to tools/release

  • Committer: ville
  • Date: 2008-02-16 09:50:47 UTC
  • mto: (0.12.1 ipython_main)
  • mto: This revision was merged to the branch mainline in revision 990.
  • Revision ID: ville@ville-pc-20080216095047-500x6dluki1iz40o
initialization (no svn history)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# IPython release script
 
3
 
 
4
PYVER=`python -V 2>&1 | awk '{print $2}' | awk -F '.' '{print $1$2}' `
 
5
version=`ipython -Version`
 
6
ipdir=~/ipython/ipython
 
7
 
 
8
echo
 
9
echo "Releasing IPython version $version"
 
10
echo "=================================="
 
11
 
 
12
echo "Marking ChangeLog with release information and making NEWS file..."
 
13
 
 
14
# Stamp changelog and save a copy of the status at each version, in case later
 
15
# we want the NEWS file to start from a point before the very last release (if
 
16
# very small interim releases have no significant changes).
 
17
 
 
18
cd $ipdir/doc
 
19
cp ChangeLog ChangeLog.old
 
20
cp ChangeLog ChangeLog.$version
 
21
daystamp=`date +%Y-%m-%d`
 
22
echo $daystamp " ***" Released version $version > ChangeLog
 
23
echo >> ChangeLog
 
24
cat ChangeLog.old >> ChangeLog
 
25
rm ChangeLog.old
 
26
 
 
27
# Build NEWS file
 
28
echo "Changes between the last two releases (major or minor)" > NEWS
 
29
echo "Note that this is an auto-generated diff of the ChangeLogs" >> NEWS
 
30
echo >> NEWS
 
31
diff ChangeLog.previous ChangeLog | grep -v '^0a' | sed 's/^> //g' >> NEWS
 
32
cp ChangeLog ChangeLog.previous
 
33
 
 
34
# Clean up build/dist directories
 
35
rm -rf $ipdir/build/*
 
36
rm -rf $ipdir/dist/*
 
37
 
 
38
# Perform local backup
 
39
cd $ipdir/tools
 
40
./bkp.sh
 
41
 
 
42
# Build source and binary distros
 
43
cd $ipdir
 
44
./setup.py sdist --formats=gztar
 
45
 
 
46
# Build version-specific RPMs, where we must use the --python option to ensure
 
47
# that the resulting RPM is really built with the requested python version (so
 
48
# things go to lib/python2.X/...)
 
49
python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4
 
50
python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5
 
51
 
 
52
# Build eggs
 
53
python2.4 ./eggsetup.py bdist_egg
 
54
python2.5 ./eggsetup.py bdist_egg
 
55
 
 
56
# Call the windows build separately, so that the extra Windows scripts don't
 
57
# get pulled into Unix builds (setup.py has code which checks for
 
58
# bdist_wininst)
 
59
./setup.py bdist_wininst --install-script=ipython_win_post_install.py
 
60
 
 
61
# Change name so retarded Vista runs the installer correctly
 
62
rename 's/win32/win32-setup/' $ipdir/dist/*.exe
 
63
 
 
64
# Register with the Python Package Index (PyPI)
 
65
echo "Registering with PyPI..."
 
66
cd $ipdir
 
67
./setup.py register
 
68
 
 
69
# Upload all files
 
70
cd $ipdir/dist
 
71
echo "Uploading distribution files..."
 
72
scp * ipython@ipython.scipy.org:www/dist/
 
73
 
 
74
echo "Uploading backup files..."
 
75
cd ~/ipython/backup
 
76
scp `ls -1tr | tail -1` ipython@ipython.scipy.org:www/backup/
 
77
 
 
78
echo "Updating webpage..."
 
79
cd $ipdir/doc
 
80
www=~/ipython/homepage
 
81
cp ChangeLog NEWS $www
 
82
rm -rf $www/doc/*
 
83
cp -r manual.pdf manual/ $www/doc
 
84
cd $www
 
85
./update
 
86
 
 
87
# Alert package maintainers
 
88
echo "Alerting package maintainers..."
 
89
maintainers='fperez@colorado.edu ariciputi@users.sourceforge.net jack@xiph.org tretkowski@inittab.de dryice@hotpop.com willmaier@ml1.net'
 
90
#maintainers='fperez@colorado.edu'
 
91
 
 
92
for email in $maintainers
 
93
    do
 
94
        echo "Emailing $email..."
 
95
        mail -s "[Package maintainer notice] A new IPython is out. Version: $version" \
 
96
    $email < NEWS
 
97
    done
 
98
 
 
99
echo "Done!"