.github/workflows/build.yaml: verify the functionality of update-check
This commit is contained in:
parent
a6a74669ef
commit
0192981922
9
.github/workflows/build.yaml
vendored
9
.github/workflows/build.yaml
vendored
@ -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:
|
||||
|
20
common/travis/verify-update-check.sh
Executable file
20
common/travis/verify-update-check.sh
Executable file
@ -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
|
Loading…
x
Reference in New Issue
Block a user