vscode: fix update script (#110096)

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by

Samuel Ainsworth
Sandro
and committed by
GitHub
bbc0f1cb aba5be8b

+2 -3
+2 -3
pkgs/applications/editors/vscode/update-vscode.sh
··· 1 1 #!/usr/bin/env nix-shell 2 - #!nix-shell -i bash -p curl gnugrep gnused gawk 2 + #!nix-shell -i bash -p curl jq gnused 3 3 4 4 # Update script for the vscode versions and hashes. 5 5 # Usually doesn't need to be called by hand, ··· 16 16 17 17 # VSCode 18 18 19 - VSCODE_VER=$(curl -s -L "https://code.visualstudio.com/Download" | grep "is now available" | awk -F'</span>' '{print $1}' | awk -F'>' '{print $NF}') 20 - VSCODE_VER=$(curl -s -L "https://code.visualstudio.com/updates/v${VSCODE_VER/./_}" | grep "Downloads:" | awk -F'code.visualstudio.com/' '{print $2}' | awk -F'/' '{print $1}') 19 + VSCODE_VER=$(curl --fail --silent https://api.github.com/repos/Microsoft/vscode/releases/latest | jq --raw-output .tag_name) 21 20 sed -i "s/version = \".*\"/version = \"${VSCODE_VER}\"/" "$ROOT/vscode.nix" 22 21 23 22 VSCODE_LINUX_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-x64/stable"