diff --git a/.github/try_vcs_checkout b/.github/try_vcs_checkout new file mode 100755 index 0000000..2409439 --- /dev/null +++ b/.github/try_vcs_checkout @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright 2023 Woven By Toyota + +CHANGE_BRANCH=$1 +SRC_FOLDER=$2 + +echo try checking out ${CHANGE_BRANCH} +vcs custom $SRC_FOLDER --args branch -f $CHANGE_BRANCH origin/$CHANGE_BRANCH > /dev/null || true +vcs custom $SRC_FOLDER --args merge --no-edit $CHANGE_BRANCH > /dev/null || true +DIFF=$(vcs diff -s $SRC_FOLDER | tr -d '.\n') +if [ ! -z "$DIFF" ]; then + echo "Have merge conflicts!" + echo $DIFF + exit 1 +fi +vcs status $SRC_FOLDER