# This script should be called from within Hudson cd $WORKSPACE VENV=$WORKSPACE/venv VENDOR=$WORKSPACE/vendor LOCALE=$WORKSPACE/locale SETTINGS=default echo "Starting build on executor $EXECUTOR_NUMBER..." `date` if [ -z $1 ]; then echo "Warning: You should provide a unique name for this job to prevent database collisions." echo "Usage: ./build.sh " echo "Continuing, but don't say you weren't warned." fi if [ -z $2 ]; then echo "Warning: no settings file specified, using: default" echo "Usage: ./build.sh " else SETTINGS=$2 fi echo "Setup..." `date` # Make sure there's no old pyc files around. find . -name '*.pyc' | xargs rm if [ ! -d "$VENV/bin" ]; then echo "No virtualenv found. Making one..." virtualenv $VENV fi source $VENV/bin/activate pip install -q -r requirements/compiled.txt # Create paths we want for addons if [ ! -d "/tmp/warez" ]; then mkdir /tmp/warez fi if [ ! -d "$LOCALE" ]; then echo "No locale dir? Cloning..." svn co http://svn.mozilla.org/addons/trunk/site/app/locale/ $LOCALE fi if [ ! -d "$VENDOR" ]; then echo "No vendor lib? Cloning..." git clone --recursive git://github.com/mozilla/zamboni-lib.git $VENDOR fi # Update the vendor lib. echo "Updating vendor..." git submodule --quiet foreach 'git submodule --quiet sync' git submodule --quiet sync && git submodule update --init --recursive cat > settings_local.py <