From 7e88656097919eb3e9f1c9d7dae3f57e143bc95a Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Sun, 17 Nov 2024 16:31:56 +0100 Subject: [PATCH] protonmail-desktop: fix update-script --- pkgs/by-name/pr/protonmail-desktop/update.sh | 26 +++----------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/pr/protonmail-desktop/update.sh b/pkgs/by-name/pr/protonmail-desktop/update.sh index 4b1a10f17738..bd197203b8bc 100755 --- a/pkgs/by-name/pr/protonmail-desktop/update.sh +++ b/pkgs/by-name/pr/protonmail-desktop/update.sh @@ -5,25 +5,7 @@ set -eu -o pipefail -latestVersion=$(curl https://api.github.com/repos/ProtonMail/inbox-desktop/releases/latest | jq -r '.tag_name') - -declare -A platforms -platforms[x86_64-linux]="amd64" -platforms[x86_64-darwin]="universal" - -for platform in "${!platforms[@]}" -do - arch=${platforms[$platform]} - os=$(echo "$platform" | cut -d "-" -f2) - - if [[ "$os" == "linux" ]]; then - downloadUrl="https://github.com/ProtonMail/inbox-desktop/releases/download/${latestVersion}/proton-mail_${latestVersion}_${arch}.deb" - else - downloadUrl="https://github.com/ProtonMail/inbox-desktop/releases/download/${latestVersion}/Proton.Mail-${os}-${arch}-${latestVersion}.zip" - fi - echo "$downloadUrl" - - latestSha=$(nix store prefetch-file "$downloadUrl" --json | jq -r '.hash') - - update-source-version "protonmail-desktop" "$latestVersion" "$latestSha" --system="$platform" --ignore-same-version --file=./pkgs/by-name/pr/protonmail-desktop/package.nix -done +latestVersion=$(curl https://proton.me/download/mail/linux/version.json | jq -r 'first(.Releases[])|.Version') +downloadUrl="https://proton.me/download/mail/linux/${latestVersion}/ProtonMail-desktop-beta.deb" +latestSha=$(nix store prefetch-file "$downloadUrl" --json | jq -r '.hash') +update-source-version "protonmail-desktop" "$latestVersion" "$latestSha" --ignore-same-version --file=./pkgs/by-name/pr/protonmail-desktop/package.nix