chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / jd / jdt-language-server / update.sh
blob153d2024b1cb40bbece9e60035e642f3e9a84d80
1 #! /usr/bin/env nix-shell
2 #! nix-shell -i bash --pure -p curl cacert libxml2 yq nix jq
4 set -euo pipefail
6 cd "$(dirname "${BASH_SOURCE[0]}")"
7 DRV_DIR="$PWD"
9 # scrape the downloads page for release info
10 newver=$(curl -s 'https://download.eclipse.org/jdtls/milestones/' | xmllint --html - --xmlout 2>/dev/null | xq --raw-output '.html.body.main.div.div.div[0].div.table.tr | max_by(.td[3]).td[1].a.["#text"]')
12 prefix="https://download.eclipse.org/jdtls/milestones/$newver"
14 filename=$(curl -s "$prefix/latest.txt")
15 newtimestamp=$(echo $filename | sed "s|^.*-$newver-||;s|\.tar\.gz$||")
16 newhash="$(nix-hash --to-sri --type sha256 $(nix-prefetch-url "$prefix/$filename"))";
18 sed -i package.nix \
19 -e "/^ version =/ s|\".*\"|\"$newver\"|" \
20 -e "/^ timestamp =/ s|\".*\"|\"$newtimestamp\"|" \
21 -e "/^ hash =/ s|\".*\"|\"$newhash\"|" \