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:
authorPaul Spooren <mail@aparcar.org>2020-09-18 11:46:54 +0300
committerPaul Spooren <mail@aparcar.org>2020-09-18 11:52:26 +0300
commit78c96b823fde17576ae2a5efa17c06032e73c45b (patch)
treecfaf8d7d30ba4c264bf4a2e53ba09b78a55dc4c3
parent94d922b15c2698f0d66c761058d480c425d983f6 (diff)
check mirror hash during package checkv2
This follows the script from CircleCI in testing the PKG_MIRROR_HASH. Not updating this hash after a package bump is a common error. Signed-off-by: Paul Spooren <mail@aparcar.org>
-rwxr-xr-xentrypoint.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/entrypoint.sh b/entrypoint.sh
index 710ad2d..f40160f 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -35,12 +35,29 @@ else
make \
BUILD_LOG="$BUILD_LOG" \
IGNORE_ERRORS="$IGNORE_ERRORS" \
- "package/$PKG/download" V=s
+ "package/$PKG/download" V=s || \
+ exit $?
make \
BUILD_LOG="$BUILD_LOG" \
IGNORE_ERRORS="$IGNORE_ERRORS" \
- "package/$PKG/check" V=s 2>&1
+ "package/$PKG/check" V=s 2>&1 | \
+ tee logtmp
+
+ RET=${PIPESTATUS[0]}
+
+ if [ $RET -ne 0 ]; then
+ echo_red "=> Package check failed: $RET)"
+ exit $RET
+ fi
+
+ badhash_msg="HASH does not match "
+ badhash_msg+="|HASH uses deprecated hash,"
+ badhash_msg+="|HASH is missing,"
+ if grep -qE "$badhash_msg" logtmp; then
+ echo "Package HASH check failed"
+ exit 1
+ fi
done
make \