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
21 lines
684 B
Bash
Executable File
21 lines
684 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -I nixpkgs=./. --pure -i bash -p curl cacert git nix nix-update
|
|
|
|
versionList=$(curl -s "https://www.hifile.app/otherdownloads" | grep -A 10 '<h1>All downloads</h1>' | grep -oP 'HiFile-\K[0-9.]+(?=\.AppImage)')
|
|
|
|
# Get the latest version by sorting the list of versions
|
|
latestVersion=$(echo "$versionList" | sort -V | tail -n 1)
|
|
|
|
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; hifile.version" | tr -d '"')
|
|
|
|
echo "latest version: $latestVersion"
|
|
echo "current version: $currentVersion"
|
|
|
|
if [[ "$latestVersion" == "$currentVersion" ]]; then
|
|
echo "package is up-to-date"
|
|
exit 0
|
|
fi
|
|
|
|
|
|
nix-update hifile --version $latestVersion
|