Skip to content

Commit

Permalink
Testing commitbot
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin committed May 23, 2024
1 parent d5a9a76 commit b019dd4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/commit-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ jobs:
submodule_name=$(echo "$key" | awk -F '.' '{print $2}')
submodule_path=$(echo "$path")
url=$(git config --file .gitmodules --get-regexp "^submodule\.$submodule_name\.url$" | awk '{print $2}')
hash=$(git ls-remote "$url" "refs/heads/$branch" | cut -f 1)
hash="${hash#"${hash%%[![:space:]]*}"}"
hash="${hash%"${hash##*[![:space:]]}"}"
commit_id="${hash:0:8}"
current_hash=$(git ls-remote "$url" "refs/heads/$branch" | cut -f 1)
current_hash="${current_hash#"${current_hash%%[![:space:]]*}"}"
current_hash="${current_hash%"${hash##*[![:space:]]}"}"
commit_id="${current_hash:0:8}"
previous_hash=$(git ls-tree HEAD "$submodule_path" | awk '{print $3}')
previous_hash="${previous_hash#"${previous_hash%%[![:space:]]*}"}"
previous_hash="${previous_hash%"${previous_hash##*[![:space:]]}"}"
previous_commit_id="${previous_hash:0:8}"
if [ "$hash" == "$previous_hash" ]; then
if [ "$current_hash" == "$previous_hash" ]; then
echo "$submodule_name ($commit_id): OK"
else
echo "$submodule_name: $previous_commit_id -> $commit_id"
Expand Down

0 comments on commit b019dd4

Please sign in to comment.