diff options
author | Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> | 2021-02-15 05:13:05 +0300 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-02-19 05:57:00 +0300 |
commit | b385dcad35c0dd7d1359ec4e3d391e1657608b98 (patch) | |
tree | 28e030722a6b9363a26c246af2eb211aff55e2e0 /entrypoint.sh | |
parent | af74f62bb0ed654a8bae85d30d3f63700dcd88f7 (diff) |
Add dirty patch check
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Diffstat (limited to 'entrypoint.sh')
-rwxr-xr-x | entrypoint.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/entrypoint.sh b/entrypoint.sh index fc98190..95f266c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 \ |