Skip to content

Commit

Permalink
List branches and print hash on error
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jun 10, 2024
1 parent 86c1f81 commit e139aa2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0 # all
# Only check for missing hashes in new files
- name: Any files missing hash key?
run: scripts/check-i18n.sh -n -x
run: scripts/check-i18n.sh -n -x -v
- name: Any files with invalid hash keys?
run: scripts/check-i18n.sh
- run: .github/workflows/scripts/check-i18n-helper.sh
12 changes: 8 additions & 4 deletions scripts/check-i18n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ function process_CLI_args() {
TARGET_PATHS="$DEFAULT_TARGET"
# [[ -n $FLAG_VERBOSE ]] || echo "INFO: using default target path: $TARGET_PATHS"
fi

if [[ -n $FLAG_VERBOSE ]]; then
echo "INFO: local branches"
git branch -vv
echo
fi

if [[ -z $FLAG_QUIET ]]; then
echo "Processing paths: $TARGET_PATHS"
fi
Expand Down Expand Up @@ -223,9 +230,6 @@ function main() {
# if [[ -n $FLAG_VERBOSE ]]; then echo -e "All targets: $TARGETS"; fi
fi

# set -x
# git branch -vv

local LASTCOMMIT_FF="" # commit From File (FF), i.e., $f in the loop below
local LASTCOMMIT_GIT="" # last commit of `en` version of $f from git
local FILE_COUNT=0 # Number of TLP
Expand Down Expand Up @@ -276,7 +280,7 @@ function main() {
((FILE_PROCESSED_COUNT++))
EXIT_STATUS=$DIFF_STATUS
# if [[ -z $FLAG_QUIET ]]; then
echo -e "HASH\tERROR\t$f: invalid hash or 'git diff' error (status: $DIFF_STATUS). For details, use -v."
echo -e "HASH\tERROR\t$f: git diff error ($DIFF_STATUS) or invalid hash $LASTCOMMIT. For details, use -v."
# fi
if [[ -n $FLAG_VERBOSE ]]; then echo "$DIFF"; fi
continue
Expand Down

0 comments on commit e139aa2

Please sign in to comment.