From 8112e9337690bf378c25ed9c72291323f06b6912 Mon Sep 17 00:00:00 2001 From: Matthew Arnold <5075485+mrnold@users.noreply.github.com> Date: Mon, 18 Jan 2021 14:22:38 -0500 Subject: [PATCH] Try to not fail job on empty directories. --- .github/workflows/update.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 88931c6..cacf31b 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -29,7 +29,7 @@ jobs: for release in ${RELEASES} do release=${release%?} - TARBALLS=$(curl --silent https://download.libguestfs.org/nbdkit/$release/ | xmllint --html --noblanks --xpath "/html/body/table/tr/td[contains(a/@href, '.tar.gz') and not(contains(a/@href, '.tar.gz.sig'))]/a/@href" -) + TARBALLS=$(curl --silent https://download.libguestfs.org/nbdkit/$release/ | xmllint --html --noblanks --xpath "/html/body/table/tr/td[contains(a/@href, '.tar.gz') and not(contains(a/@href, '.tar.gz.sig'))]/a/@href" -) || true for tarball in ${TARBALLS} do IFS=\"$IFS read href tarball suffix <<< $tarball # Intentionally overwrite tarball @@ -40,6 +40,7 @@ jobs: echo continue fi + latestrelease=$release version=$major.$minor.$build tag=v$major.$minor.$build echo Branch: $release Tar: $tarball Tag: $tag @@ -89,13 +90,13 @@ jobs: done done - latest=$(tail -n 1 <<< $release) + latest=$(tail -n 1 <<< $latestrelease) git checkout main - if git rev-parse --verify $release + if git rev-parse --verify $latestrelease then echo Copy newest bindings from local $latest git checkout $latest ./ - elif git rev-parse --verify origin/$release + elif git rev-parse --verify origin/$latestrelease then echo Copy newest bindings from remote $latest git checkout origin/$latest ./