Skip to content
Snippets Groups Projects
Select Git revision
  • 563b72347a1cad3f748a0bade199830706fcb4b0
  • main default protected
  • renovate/djangorestframework-3.x
  • renovate/django-5.x
  • renovate/django-bootstrap5-25.x
  • renovate/django-debug-toolbar-6.x
  • renovate/jsonschema-4.x
  • koma/feature/preference-polling-form
8 results

json_export.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    json_export.sh 666 B
    #!/usr/bin/env bash
    # Update AKPlanning
    # execute as Utils/update.sh id_to_export target_name_to_export_to [--prod]
    
    # abort on error, print executed commands
    set -ex
    
    # activate virtualenv if necessary
    if [ -z ${VIRTUAL_ENV+x} ]; then
        source venv/bin/activate
    fi
    
    # set environment variable when we want to update in production
    if [ "$3" = "--prod" ]; then
        export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
    fi
    
    mkdir -p ../backups/
    python manage.py dumpdata AKDashboard AKModel AKOnline AKPlan AKScheduling AKSubmission --indent=2 > "backups/akplanning_only.json" --traceback
    
    python ./Utils/json_export.py $1 $2
    
    rm backups/akplanning_only.json