Merge pull request #258417 from DerGuteMoritz/improve-clojure-update-script-robustness

clojure: improve updateScript error behavior
This commit is contained in:
Thiago Kenji Okada 2023-10-01 17:57:45 +01:00 committed by GitHub
commit 4edbf793a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,11 +61,12 @@ stdenv.mkDerivation (finalAttrs: {
#!nix-shell -i bash -p curl common-updater-scripts jq
set -euo pipefail
shopt -s inherit_errexit
# `jq -r '.[0].name'` results in `v0.0`
readonly latest_version="$(curl \
latest_version="$(curl \
''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
-s "https://api.github.com/repos/clojure/brew-install/tags" \
-fsL "https://api.github.com/repos/clojure/brew-install/tags" \
| jq -r '.[1].name')"
update-source-version clojure "$latest_version"