mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
50ba995a1c
Polaris is a self-hosted music streaming server, with a web and android frontend. The web frontend is included. https://github.com/agersant/polaris Polaris-web uses an odd versioning schema: 'build-X'. We reuse the upstream tags. Polaris CI releases automatically bundle the latest available version of polaris-web, however 'polaris' has seen no release since april 2021, while polaris-web has had 5 version bumps since. Currently we package the version of polaris-web bundled with polaris on github. Once the newer versions are tested we might upgrade.
19 lines
592 B
Bash
Executable File
19 lines
592 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p common-updater-scripts curl jq nix coreutils
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"/../../..
|
|
|
|
# update github tag and hash
|
|
|
|
latestVersion="$(curl -s "https://api.github.com/repos/agersant/polaris/releases?per_page=1" | jq -r ".[0].tag_name")"
|
|
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; polaris.version or (lib.getVersion polaris)" | tr -d '"')
|
|
|
|
if [[ "$currentVersion" == "$latestVersion" ]]; then
|
|
echo "polaris is up-to-date: $currentVersion"
|
|
exit 0
|
|
fi
|
|
|
|
update-source-version polaris "$latestVersion"
|