diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index df91320404f..d860feff70d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -37,7 +37,7 @@ jobs: # Upgrade again (in case there was a xbps update) xbps-install -yu # install tools needed for lints - xbps-install -y grep + xbps-install -y grep curl - name: Clone and checkout uses: classabbyamp/treeless-checkout-action@v1 - name: Create hostrepo and prepare masterdir @@ -47,7 +47,12 @@ jobs: common/travis/prepare.sh && common/travis/fetch-xtools.sh - run: common/travis/changed_templates.sh - - run: common/travis/xlint.sh + - name: Run lints + run: | + rv=0 + common/travis/xlint.sh || rv=1 + common/travis/verify-update-check.sh || rv=1 + exit $rv # Build changed packages. build: diff --git a/common/travis/verify-update-check.sh b/common/travis/verify-update-check.sh new file mode 100755 index 00000000000..902ebc0d6b4 --- /dev/null +++ b/common/travis/verify-update-check.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# runs update-check on all changed templates, then errors only if there was an +# issue with the update-check. does not error if further updates are available, +# as there may be a good reason not to update to those versions + +set -e + +export XBPS_UPDATE_CHECK_VERBOSE=yes +err=0 + +while read -r pkg; do + /bin/echo -e "\x1b[34mVerifying update-check of $pkg:\x1b[0m" + ./xbps-src update-check "$pkg" 2>&1 > /tmp/update-check.log || err=1 + cat /tmp/update-check.log + if grep -q 'NO VERSION' /tmp/update-check.log; then + echo "::warning file=srcpkgs/$pkg/template,line=1,title=update-check failed::verify and fix update-check for $pkg" + fi +done < /tmp/templates + +exit $err