Skip to content

Commit

Permalink
Add dirty patch check
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
  • Loading branch information
lipnitsk authored and aparcar committed Feb 19, 2021
1 parent af74f62 commit b385dca
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ else
echo "Package HASH check failed"
exit 1
fi

PATCHES_DIR=$(find "$GITHUB_WORKSPACE" -path "*/$PKG/patches")
if [ -d "$PATCHES_DIR" ]; then
make \
BUILD_LOG="$BUILD_LOG" \
IGNORE_ERRORS="$IGNORE_ERRORS" \
"package/$PKG/refresh" V=s || \
exit $?

git -C "$PATCHES_DIR" diff --quiet -- .
if [ $? -ne 0 ]; then
echo "Dirty patches detected, please refresh and review the diff"
git -C "$PATCHES_DIR" checkout -- .
exit 1
fi
fi
done

make \
Expand Down

0 comments on commit b385dca

Please sign in to comment.