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 ./