DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Git (5daaab71bb)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
set -xe

/app/scripts/generate_version_file.sh

if [ ! -e /app/.cache/mysql/db.done ]; then
    sleep 30
    echo "Initializing DB..."
    PYTHONPATH=${PYTHONPATH}:/app/vendor/lib/python python /app/migrate_repo/manage.py version_control mysql://shipit:shipitpw@shipitdb/shipit migrate_repo
    # the sample data is for schema version 21
    PYTHONPATH=${PYTHONPATH}:/app/vendor/lib/python python /app/migrate_repo/manage.py upgrade --version=21 mysql://shipit:shipitpw@shipitdb/shipit migrate_repo
    bunzip2 -c /app/scripts/sample-data.sql.bz2 | mysql -h shipitdb -u shipit --password=shipitpw shipit
    # update to the latest schema
    PYTHONPATH=${PYTHONPATH}:/app/vendor/lib/python python /app/migrate_repo/manage.py upgrade mysql://shipit:shipitpw@shipitdb/shipit migrate_repo
    touch /app/.cache/mysql/db.done
    echo "Done"
else
    sleep 10
    echo "Upgrading DB...";
    PYTHONPATH=${PYTHONPATH}:/app/vendor/lib/python python /app/migrate_repo/manage.py upgrade mysql://shipit:shipitpw@shipitdb/shipit migrate_repo
fi

# run the command passed from docker
$@