manage.sh 580 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. if [[ $1 = "add" ]]
  4. then
  5. if [[ $2 = "raw" ]]
  6. then
  7. time python -m build_django --dir "./tests/test_projects/$(openssl rand -hex 20)" "${@:3}" test_proect
  8. fi
  9. if [[ $2 = "" ]]
  10. then
  11. time python -m build_django --dir "./tests/test_projects/$(openssl rand -hex 20)" --git --commit --debug --migrate --no-compile --use-ssl --commit-message "Test commit" test_project
  12. fi
  13. elif [[ $1 = "clear" ]]
  14. then
  15. rm -rfvd ./tests/test_projects/*
  16. echo "*" > ./tests/test_projects/.gitignore
  17. echo "!.gitignore" >> ./tests/test_projects/.gitignore
  18. fi