Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9313742
postinst
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
556 B
Subscribers
None
postinst
View Options
#!/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
Details
Attached
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
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment