Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/gh-action-sdk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>2021-02-15 05:13:05 +0300
committerPaul Spooren <mail@aparcar.org>2021-02-19 05:57:00 +0300
commitb385dcad35c0dd7d1359ec4e3d391e1657608b98 (patch)
tree28e030722a6b9363a26c246af2eb211aff55e2e0 /entrypoint.sh
parentaf74f62bb0ed654a8bae85d30d3f63700dcd88f7 (diff)
Add dirty patch check
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Diffstat (limited to 'entrypoint.sh')
-rwxr-xr-xentrypoint.sh16
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 \