Merge pull request #257148 from SebTM/slack_updatescript

slack: Updatescript allow independent updates between linux and macos
This commit is contained in:
Weijia Wang 2023-09-25 17:41:39 +02:00 committed by GitHub
commit 12d9af932f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,12 +6,6 @@ set -eou pipefail
latest_linux_version=$(curl -L --silent https://slack.com/downloads/linux | sed -n 's/.*Version \([0-9\.]\+\).*/\1/p')
latest_mac_version=$(curl -L --silent https://slack.com/downloads/mac | sed -n 's/.*Version \([0-9\.]\+\).*/\1/p')
# Double check that the latest mac and linux versions are in sync.
if [[ "$latest_linux_version" != "$latest_mac_version" ]]; then
echo "the latest linux ($latest_linux_version) and mac ($latest_mac_version) versions are not the same"
exit 1
fi
nixpkgs="$(git rev-parse --show-toplevel)"
slack_nix="$nixpkgs/pkgs/applications/networking/instant-messengers/slack/default.nix"
nixpkgs_linux_version=$(cat "$slack_nix" | sed -n 's/.*x86_64-linux-version = \"\([0-9\.]\+\)\";.*/\1/p')