3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/continuous-integration/jenkins/update.sh
2018-10-13 10:34:26 +01:00

14 lines
439 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -eu -o pipefail
core_json="$(curl --fail --location https://updates.jenkins.io/stable/update-center.actual.json | jq .core)"
version="$(jq -r .version <<<$core_json)"
sha256="$(jq -r .sha256 <<<$core_json)"
hash="$(nix-hash --type sha256 --to-base32 "$sha256")"
url="$(jq -r .url <<<$core_json)"
update-source-version jenkins "$version" "$hash" "$url"