Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
16 lines
715 B
Bash
Executable File
16 lines
715 B
Bash
Executable File
#! /usr/bin/env nix-shell
|
|
#! nix-shell -I nixpkgs=./. -i bash -p curl xq-xml common-updater-scripts
|
|
set -euo pipefail
|
|
|
|
OLD_VERSION="$(nix-instantiate --eval --json --expr 'let pkgs = import ./. {}; in pkgs._7zz.version' | sed 's/"//g')"
|
|
NEW_VERSION="$(curl -H 'Accept: application/rss+xml' 'https://sourceforge.net/projects/sevenzip/rss?path=/7-Zip' | xq -x "substring((/rss/channel/item[link[contains(., 'src.tar.xz')]])[1]/title, 8, 5)")"
|
|
|
|
echo "comparing versions $OLD_VERSION => $NEW_VERSION"
|
|
if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
|
|
echo "Already up to date! Doing nothing"
|
|
exit 0
|
|
fi
|
|
|
|
update-source-version _7zz "$NEW_VERSION"
|
|
update-source-version _7zz-rar "$NEW_VERSION" --ignore-same-version
|