pre-compile.sh 847 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. # NOTE: PROFILE_STR may not be exactly PROFILE (emqx or emqx-enterprise)
  4. # it might be with suffix such as -pkg etc.
  5. PROFILE_STR="${1}"
  6. case "$PROFILE_STR" in
  7. *enterprise*)
  8. dashboard_version="$EMQX_EE_DASHBOARD_VERSION"
  9. ;;
  10. *)
  11. dashboard_version="$EMQX_DASHBOARD_VERSION"
  12. ;;
  13. esac
  14. # ensure dir
  15. cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
  16. ./scripts/get-dashboard.sh "$dashboard_version"
  17. # generate merged config files and English translation of the desc (desc.en.hocon)
  18. ./scripts/merge-config.escript
  19. # download desc (i18n) translations
  20. curl -L --silent --show-error \
  21. --output "apps/emqx_dashboard/priv/desc.zh.hocon" \
  22. 'https://raw.githubusercontent.com/emqx/emqx-i18n/main/desc.zh.hocon'
  23. # generate sbom
  24. ./scripts/update-bom.sh "$PROFILE_STR" ./rel