Set pipefail in the update script

When download of the repository metadata fails or returns bogus
information pipes downstream will fail and the failure will get masked
which leads to bogus PRs like #4
This commit is contained in:
Simonas Kazlauskas
2023-09-03 17:22:47 +03:00
parent 61c977db5e
commit 236eed6cb0

View File

@@ -2,6 +2,7 @@
#!nix-shell -i bash -p curl jq ripgrep gawk
set -eux
set -o pipefail
readarray -t RELEASES <<<"$(curl https://api.github.com/repos/openhab/openhab-distro/tags | jq -r '.[].name' | rg '^\d+\.\d+\.\d+*$')"
MOST_RECENT=${RELEASES[0]}