chore: skip download i18n translate file env

This commit is contained in:
zhongwencool 2023-11-29 18:22:38 +08:00
parent 0aec2f7605
commit 9e85deb273
1 changed files with 6 additions and 6 deletions

View File

@ -27,21 +27,21 @@ cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
I18N_REPO_BRANCH="v$(./pkg-vsn.sh "${PROFILE_STR}" | tr -d '.' | cut -c 1-2)"
UPDATE_I18N=${UPDATE_I18N:-true}
DOWNLOAD_I18N_TRANSLATIONS=${DOWNLOAD_I18N_TRANSLATIONS:-true}
# download desc (i18n) translations
if [ "$UPDATE_I18N" = "true" ]; then
echo "updating i18n file from emqx-i18n repo"
if [ "$DOWNLOAD_I18N_TRANSLATIONS" = "true" ]; then
echo "downloading i18n translation from emqx/emqx-i18n"
start=$(date +%s)
curl -L --silent --show-error \
--output "apps/emqx_dashboard/priv/desc.zh.hocon" \
"https://raw.githubusercontent.com/emqx/emqx-i18n/${I18N_REPO_BRANCH}/desc.zh.hocon"
end=$(date +%s)
duration=$(echo "$end $start" | awk '{print $1 - $2}')
echo "updated i18n file using $duration seconds, set UPDATE_I18N=false to skip"
echo "downloaded i18n translation in $duration seconds, set DOWNLOAD_I18N_TRANSLATIONS=false to skip"
else
echo "skipping update i18n file from emqx-i18n repo, set UPDATE_I18N=true to update"
echo "skipping to download i18n translation from emqx/emqx-i18n, set DOWNLOAD_I18N_TRANSLATIONS=true to update"
fi
# TODO
# make sbom a build artifcat
# make sbom a build artifact
# ./scripts/update-bom.sh "$PROFILE_STR" ./rel