Try to not fail job on empty directories.
This commit is contained in:
parent
fd424f6985
commit
8112e93376
1 changed files with 5 additions and 4 deletions
9
.github/workflows/update.yml
vendored
9
.github/workflows/update.yml
vendored
|
@ -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 ./
|
||||
|
|
Loading…
Reference in a new issue