diff --git a/.github/workflows/kutegen_submodule_check.yml b/.github/workflows/kutegen_submodule_check.yml index 7441e63b..7adb3018 100644 --- a/.github/workflows/kutegen_submodule_check.yml +++ b/.github/workflows/kutegen_submodule_check.yml @@ -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." \ No newline at end of file