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 #!/usr/bin/env nix-shell 2 - #!nix-shell -i bash -p curl gnugrep gnused gawk 3 4 # Update script for the vscode versions and hashes. 5 # Usually doesn't need to be called by hand, ··· 16 17 # VSCode 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}') 21 sed -i "s/version = \".*\"/version = \"${VSCODE_VER}\"/" "$ROOT/vscode.nix" 22 23 VSCODE_LINUX_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-x64/stable"
··· 1 #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl jq gnused 3 4 # Update script for the vscode versions and hashes. 5 # Usually doesn't need to be called by hand, ··· 16 17 # VSCode 18 19 + VSCODE_VER=$(curl --fail --silent https://api.github.com/repos/Microsoft/vscode/releases/latest | jq --raw-output .tag_name) 20 sed -i "s/version = \".*\"/version = \"${VSCODE_VER}\"/" "$ROOT/vscode.nix" 21 22 VSCODE_LINUX_URL="https://vscode-update.azurewebsites.net/${VSCODE_VER}/linux-x64/stable"