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 migrate --settings=swh.web.settings.production $MIGRATE_EXTRA_OPTS
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Thu, Jul 3, 11:53 AM (3 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3338432

Event Timeline