diff options
author | Paul Spooren <mail@aparcar.org> | 2020-09-18 11:46:54 +0300 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2020-09-18 11:52:26 +0300 |
commit | 78c96b823fde17576ae2a5efa17c06032e73c45b (patch) | |
tree | cfaf8d7d30ba4c264bf4a2e53ba09b78a55dc4c3 | |
parent | 94d922b15c2698f0d66c761058d480c425d983f6 (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-x | entrypoint.sh | 21 |
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 \ |