Skip to content
Snippets Groups Projects
Select Git revision
  • bdf573082431d30d5ebbd40cfd0046d3de1782cd
  • main default protected
  • renovate/jsonschema-4.x
  • renovate/django-5.x
  • koma/feature/preference-polling-form
5 results

check.sh

Blame
  • Nadja Geisler's avatar
    Nadja Geisler authored and Benjamin Hättasch committed
    210f9deb
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    check.sh 717 B
    #!/usr/bin/env bash
    # Check the AKPlanning setup for potential problems
    # execute as Utils/check.sh
    
    # activate virtualenv when necessary
    if [ -z ${VIRTUAL_ENV+x} ]; then
        source venv/bin/activate
    fi
    
    # enable really all warnings, some of them are silenced by default
    for arg in "$@"; do
        if [[ "$arg" == "--all" ]]; then
            export PYTHONWARNINGS=all
        fi
    done
    
    # in case of checking production setup
    for arg in "$@"; do
        if [[ "$arg" == "--prod" ]]; then
          export DJANGO_SETTINGS_MODULE=AKPlanning.settings_production
          ./manage.py check --deploy
          ./manage.py makemigrations --dry-run --check
        fi
    done
    
    # check the setup
    ./manage.py check
    ./manage.py makemigrations --dry-run --check