Page MenuHomeSoftware Heritage

postinst
No OneTemporary

postinst

#!/bin/bash
set -e
GET_VERSION_SCRIPT="
from pkg_resources import get_distribution
print(get_distribution('swh.web').version)"
if [ -f /var/lib/swh/web.sqlite3 ]; then
echo "Software Heritage production db detected; running migrations"
SWH_WEB_VERSION=$(python3 -c "$GET_VERSION_SCRIPT")
if [ "$SWH_WEB_VERSION" == "0.0.279" ]
then
# use fake migrations after django app labels renaming in v0.0.279
MIGRATE_EXTRA_OPTS="--fake"
fi
django-admin rename_app --settings=swh.web.settings.production swh_web_common swh_web_save_code_now
django-admin migrate --settings=swh.web.settings.production $MIGRATE_EXTRA_OPTS
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Jun 21, 7:04 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3354181

Event Timeline