Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

61 строка
3.1 KiB

  1. # Shows help
  2. default:
  3. @just --list --justfile {{ justfile() }}
  4. # Extracts original English strings (translation templates) into the `translation-templates/` directory
  5. extract-translation-templates: _venv
  6. @echo "Extracting translation templates..."
  7. PATH={{ justfile_directory() }}/.venv/bin:$PATH {{ justfile_directory() }}/bin/extract-translation-templates.sh
  8. # Syncs the translation templates (affects `translation-templates/`) and strings (affects `locales/*`) for all published languages (`PUBLISHED_LANGUAGES`)
  9. sync-for-all-published-languages: _venv
  10. #!/bin/sh
  11. cat {{ justfile_directory() }}/PUBLISHED_LANGUAGES | while read language ; do
  12. {{ just_executable() }} sync-for-language $language
  13. done
  14. # Syncs the translation templates (affects `translation-templates/`) and strings for all known languages (`KNOWN_LANGUAGES`)
  15. sync-for-all-known-languages:
  16. #!/bin/sh
  17. find {{ justfile_directory() }}/locales -mindepth 1 -maxdepth 1 -type d | while read path ; do
  18. language=$(basename "$path")
  19. echo "Syncing for language $language.."
  20. {{ just_executable() }} sync-for-language $language
  21. done
  22. # Updates the translation templates (affects `translation-templates/`) and syncs the translation strings for a given language (affects `locales/{{ language }}`)
  23. sync-for-language language: extract-translation-templates (_sync-translation-templates-to-locales-for-language language)
  24. # Updates `locales/{{ language }}` files based on the original template strings from `translation-templates/`
  25. _sync-translation-templates-to-locales-for-language language: _venv
  26. PATH={{ justfile_directory() }}/.venv/bin:$PATH {{ justfile_directory() }}/bin/sync-translation-templates-to-locales.sh {{ language }}
  27. # Builds the translated result for a given language into the `translated/{{ language }}` directory
  28. build-for-language language: _venv
  29. PATH={{ justfile_directory() }}/.venv/bin:$PATH {{ justfile_directory() }}/bin/build-translated-result.sh {{ language }}
  30. # Builds the translated result for all published languages into the `translated/` directory
  31. build-for-all-published-languages:
  32. #!/bin/sh
  33. cat {{ justfile_directory() }}/PUBLISHED_LANGUAGES | while read language ; do
  34. {{ just_executable() }} build-for-language $language
  35. done
  36. # Builds the translated result for all known languages into the `translated/` directory
  37. build-for-all-known-languages:
  38. #!/bin/sh
  39. find {{ justfile_directory() }}/locales -mindepth 1 -maxdepth 1 -type d | while read path ; do
  40. language=$(basename "$path")
  41. echo "Building for language $language.."
  42. {{ just_executable() }} build-for-language $language
  43. done
  44. # Creates the virtual environment and installs the required Python packages
  45. _venv:
  46. #!/bin/sh
  47. if [ ! -f {{ justfile_directory() }}/.venv/bin/sphinx-build ]; then
  48. echo "No sphinx-build found, creating virtual environment and installing requirements..."
  49. uv venv {{ justfile_directory() }}/.venv
  50. VIRTUAL_ENV={{ justfile_directory() }}/.venv uv pip install -r {{ justfile_directory() }}/requirements.txt
  51. fi