Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions tests/ci/repo_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ get_shas () {
git fetch -q upstream $branch
common=$(git merge-base $base_sha @)
echo $common $base_sha $workspace
if [[ $common != $base_sha ]]; then
if [[ "$common" != "$base_sha" ]]; then
printf "%s\n\n" "** $workspace **NOT** up to date"
flag_sync=false
fi
Expand Down Expand Up @@ -101,12 +101,14 @@ for submodule in $submodules; do
workspace=${GITHUB_WORKSPACE}'/'${pathes[$submodule]}
gitapi=$(echo "$url" | sed 's/github.com/api.github.com\/repos/g')'/branches/'$branch
get_shas $url $gitapi $branch $workspace

if [[ "$flag_sync" == "false" ]]; then
echo "** ${GITHUB_WORKSPACE} **NOT** up to date"
exit 1
fi
done

if [[ ! $flag_sync ]]; then
echo "** ${GITHUB_WORKSPACE} **NOT** up to date"
exit 1
else
echo "** ${GITHUB_WORKSPACE} up to date **"
exit 0
fi

echo "** ${GITHUB_WORKSPACE} up to date **"

exit 0