Skip to content

Commit

Permalink
Don't run get_and_print_hashes_of_main unless we need to
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jun 10, 2024
1 parent e139aa2 commit 267ed9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
- name: Any files missing hash key?
run: scripts/check-i18n.sh -n -x -v
- name: Any files with invalid hash keys?
run: scripts/check-i18n.sh
run: scripts/check-i18n.sh -v
- run: .github/workflows/scripts/check-i18n-helper.sh
7 changes: 5 additions & 2 deletions scripts/check-i18n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ function update_file_i18n_hash() {
function main() {
process_CLI_args "$@"

get_and_print_hashes_of_main
if [[ -n $FLAG_INFO ]]; then return; fi
if [[ -n $FLAG_INFO ]]; then
get_and_print_hashes_of_main
return
fi

if [ -f "$TARGET_PATHS" ] ; then
TARGETS="$TARGET_PATHS"
Expand All @@ -236,6 +238,7 @@ function main() {
local FILE_PROCESSED_COUNT=0 # Number of TLP actually listed

if [[ $COMMIT_HASH_ARG == "head" ]]; then
if [[ -z $MAIN_HEAD_HASH ]]; then get_and_print_hashes_of_main; fi
COMMIT_HASH_ARG=$MAIN_HEAD_HASH
fi

Expand Down

0 comments on commit 267ed9c

Please sign in to comment.