INFRA-3209 | Dhruv | update check failure condition
This commit is contained in:
10
.github/workflows/kutegen_submodule_check.yml
vendored
10
.github/workflows/kutegen_submodule_check.yml
vendored
@@ -30,12 +30,8 @@ jobs:
|
||||
git fetch origin main
|
||||
BEHIND=$(git rev-list origin/main ^HEAD --count)
|
||||
AHEAD=$(git rev-list HEAD ^origin/main --count)
|
||||
if [ $AHEAD -gt 2 ]; then
|
||||
echo "Submodule is more than 2 commits ahead of main branch."
|
||||
if [ $AHEAD -ne 0] || [$BEHIND -ne 0 ]; then
|
||||
echo "Submodule is not up to date with main branch."
|
||||
exit 1
|
||||
elif [ $BEHIND -gt 2 ]; then
|
||||
echo "Submodule is more than 2 commits behind main branch."
|
||||
exit 1
|
||||
else
|
||||
echo "Submodule is within 2 commits of main branch."
|
||||
fi
|
||||
echo "Submodule is up to date with main branch."
|
||||
Reference in New Issue
Block a user