-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Things changed: - Unpin electron version. Upstream updates usually fix electron incompatibilities and we also have a test which can detect them. (#295770) - Add updater script. It scrapes the upstream website for the current version number. Lets hope the website structure doesn't change too much. - Update to the latest version
- Loading branch information
Showing
3 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
version = "3.6.0"; | ||
x86_64-linux = { | ||
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.6.0-linux.deb"; | ||
sha256 = "sha256-jUp4Q9tiR/WLkTNHz97j0eE/WwcfFF3ut0S9N4M75Oc="; | ||
}; | ||
x86_64-darwin = { | ||
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-3.6.0-mac.dmg"; | ||
sha256 = "sha256-ZvTig1/fm1GRoOYuTRBiZ8j4CRbZSa95q6a0sxo39Gs="; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell -i bash -p curl jq nix ripgrep | ||
|
||
set -xeu -o pipefail | ||
|
||
PACKAGE_DIR="$(realpath "$(dirname "$0")")" | ||
|
||
current="$(nix eval -f "$PACKAGE_DIR/sources.nix" --raw version || :)" | ||
latest="$(curl -sS https://breitbandmessung.de/desktop-app | \ | ||
rg '.*Aktuelle Version der Desktop-App lautet:\s*([.0-9]+).*' -r '$1')" | ||
|
||
if [[ $current != $latest ]]; then | ||
linux_hash="$(nix store prefetch-file --json https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-linux.deb | jq -r .hash)" | ||
darwin_hash="$(nix store prefetch-file --json https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-mac.dmg | jq -r .hash)" | ||
|
||
cat <<EOF >"$PACKAGE_DIR/sources.nix" | ||
{ | ||
version = "${latest}"; | ||
x86_64-linux = { | ||
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-linux.deb"; | ||
sha256 = "${linux_hash}"; | ||
}; | ||
x86_64-darwin = { | ||
url = "https://download.breitbandmessung.de/bbm/Breitbandmessung-${latest}-mac.dmg"; | ||
sha256 = "${darwin_hash}"; | ||
}; | ||
} | ||
EOF | ||
fi |