Summary: OpenCloud core services
Name: opencloud
-Version: 1.0.25
-Release: 8
+Version: 1.0.26
+Release: 7
License: GPL+
Group: Development/Tools
Source0: %{_tmppath}/%{name}-%{version}.tar.gz
# Empty section.
%pre
-#pip-python install django==1.5
+pip-python install django==1.7
pip-python install djangorestframework
pip-python install markdown # Markdown support for the browseable API.
pip-python install pyyaml # YAML content-type support.
echo "NEW INSTALL - initializing database"
/opt/planetstack/scripts/opencloud initdb
else
- echo "UPGRADE - doing evolution"
+ # scripts/opencloud will choose evolve or migrate depending on django version
+ echo "UPGRADE - doing evolution/migration"
/opt/planetstack/scripts/opencloud evolvedb
- #echo "UPGRADE - doing migration"
- #/opt/planetstack/scripts/opencloud migratedb
fi
# start the server
createdb
syncdb
fi
-if [ "$COMMAND" = "evolvedb" ]; then
+if [ "$COMMAND" = "evolvedb" -o "$COMMAND" = "migratedb" ]; then
stopserver
ensure_postgres_running
- evolvedb
-fi
-if [ "$COMMAND" = "migratedb" ]; then
- stopserver
- ensure_postgres_running
- migratedb
+ if [[ $DJANGO_17 ]]; then
+ migratedb
+ else
+ evolvedb
+ fi
fi
if [ "$COMMAND" = "resetdb" ]; then
stopserver