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.8 KiB

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