Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

autogen.sh 1.4 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. set -e
  3. app_root_dir="diagrams"
  4. # NOTE: azure icon set is not latest version
  5. providers=("onprem" "aws" "azure" "gcp" "k8s" "alibabacloud" "oci" "programming")
  6. if ! [ -x "$(command -v round)" ]; then
  7. echo 'round is not installed'
  8. exit 1
  9. fi
  10. if ! [ -x "$(command -v inkscape)" ]; then
  11. echo 'inkscape is not installed'
  12. exit 1
  13. fi
  14. if ! [ -x "$(command -v convert)" ]; then
  15. echo 'image magick is not installed'
  16. exit 1
  17. fi
  18. # preprocess the resources
  19. for pvd in "${providers[@]}"; do
  20. # convert the svg to png for azure provider
  21. if [ "$pvd" = "onprem" ] || [ "$pvd" = "azure" ]; then
  22. echo "converting the svg to png using inkscape for provider '$pvd'"
  23. python -m scripts.resource svg2png "$pvd"
  24. fi
  25. if [ "$pvd" == "oci" ]; then
  26. echo "converting the svg to png using image magick for provider '$pvd'"
  27. python -m scripts.resource svg2png2 "$pvd"
  28. fi
  29. echo "cleaning the resource names for provider '$pvd'"
  30. python -m scripts.resource clean "$pvd"
  31. # round the all png images for aws provider
  32. if [ "$pvd" = "aws" ]; then
  33. echo "rounding the resources for provider '$pvd'"
  34. python -m scripts.resource round "$pvd"
  35. fi
  36. done
  37. # generate the module classes and docs
  38. for pvd in "${providers[@]}"; do
  39. echo "generating the modules & docs for provider '$pvd'"
  40. python -m scripts.generate "$pvd"
  41. done
  42. # run black
  43. echo "linting the all the diagram modules"
  44. black "$app_root_dir"/**/*.py