diff options
author | classabbyamp <void@placeviolette.net> | 2023-07-08 19:05:19 +0000 |
---|---|---|
committer | classabbyamp <5366828+classabbyamp@users.noreply.github.com> | 2023-09-08 08:33:16 +0000 |
commit | 019298192217acd3cc7e4134daffb1bd9703f290 (patch) | |
tree | 8e26cc9f54f1f732a67fbd9f42b3a26c9274714e | |
parent | a6a74669efe8cfb086dc8cccdfd093fc65a430ce (diff) | |
download | void-packages-019298192217acd3cc7e4134daffb1bd9703f290.tar void-packages-019298192217acd3cc7e4134daffb1bd9703f290.tar.gz void-packages-019298192217acd3cc7e4134daffb1bd9703f290.tar.bz2 void-packages-019298192217acd3cc7e4134daffb1bd9703f290.tar.lz void-packages-019298192217acd3cc7e4134daffb1bd9703f290.tar.xz void-packages-019298192217acd3cc7e4134daffb1bd9703f290.tar.zst void-packages-019298192217acd3cc7e4134daffb1bd9703f290.zip |
.github/workflows/build.yaml: verify the functionality of update-check
-rw-r--r-- | .github/workflows/build.yaml | 9 | ||||
-rwxr-xr-x | common/travis/verify-update-check.sh | 20 |
2 files changed, 27 insertions, 2 deletions
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 |