Update check-commit.sh in CI to properly checkout remote branches

This commit is contained in:
abejgonzalez
2022-02-15 23:16:09 -08:00
parent 7e1d89adc1
commit ff0eae287d

View File

@@ -25,6 +25,8 @@ search_submodule() {
# Initialize submodule and get the hashes
git submodule update --init $dir/$submodule
git -C $dir/$submodule fetch --unshallow
git -C $dir/$submodule config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git -C $dir/$submodule fetch origin
status=$(git submodule status)
hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*")