Merge branch 'v0.99'
[cds-indico.git] / generate.sh
blobc4c099012360c5d8e29779a47172d8c5869cbdb5
1 #!/bin/sh
3 # Generates Python eggs for 2.6 and 2.7
4 # -d can be passed for 'nighly builds', so that the current date is appended
5 # pythonbrew required
7 DATEOPT=
8 VERSIONS="2.7 2.6"
10 while getopts "d" Option
12 case $Option in
13 d ) DATEOPT=-d;;
14 esac
15 done
17 source ~/.pythonbrew/etc/bashrc
19 CLONE_DIR=`pwd`
20 mkdir /tmp/indico-build
21 pushd /tmp/indico-build
22 git clone $CLONE_DIR indico
23 cd indico
25 for VERSION in $VERSIONS
27 pythonbrew use $VERSION
28 pythonbrew venv use indico
29 pip install -r requirements.txt
30 python setup.py egg_info $DATEOPT bdist_egg
31 EGG_NAME=dist/`python setup.py egg_filename | tail -n 1`.egg
32 python setup.py egg_info $DATEOPT bdist_egg
33 md5sum $EGG_NAME | sh -c 'read a; echo ${a%% *}' > $EGG_NAME.md5
34 done
36 popd