-
-
Save inigohidalgo/ace584143a67d4f8d0794e3d61f85aee to your computer and use it in GitHub Desktop.
Revisions
-
b01 revised this gist
Jun 9, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -48,7 +48,7 @@ if [ -n "${commit_sha}" ]; then echo "will attempt to download VS Code Server version = '${commit_sha}'" # Download VS Code Server tarball to tmp directory. curl -L "https://update.code.visualstudio.com/commit:${commit_sha}/server-linux-${ARCH}/stable" -o "/tmp/${archive}" # Make the parent directory where the server should live. # NOTE: Ensure VS Code will have read/write access; namely the user running VScode or container user. -
b01 revised this gist
Jun 7, 2022 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -32,12 +32,11 @@ get_latest_release() { printf "${sha}" } ARCH="x64" U_NAME=$(uname -m) if [ "${U_NAME}" = "aarch64" ]; then ARCH="arm64" fi archive="vscode-server-linux-${ARCH}.tar.gz" -
b01 revised this gist
Jun 7, 2022 . 1 changed file with 12 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -45,14 +45,18 @@ owner='microsoft' repo='vscode' commit_sha=$(get_latest_release "${owner}/${repo}") if [ -n "${commit_sha}" ]; then echo "will attempt to download VS Code Server version = '${commit_sha}'" # Download VS Code Server tarball to tmp directory. curl -L "https://update.code.visualstudio.com/commit:${commit_sha}/server-linux-x64/stable" -o "/tmp/${archive}" # Make the parent directory where the server should live. # NOTE: Ensure VS Code will have read/write access; namely the user running VScode or container user. mkdir -vp ~/.vscode-server/bin/"${commit_sha}" # Extract the tarball to the right location. tar --no-same-owner -xzv --strip-components=1 -C ~/.vscode-server/bin/"${commit_sha}" -f "/tmp/${archive}" else echo "could not pre install vscode server" fi -
b01 revised this gist
Jun 7, 2022 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -40,8 +40,6 @@ elif [ "${U_NAME}" = "x86_64" ]; then ARCH="x64" fi archive="vscode-server-linux-${ARCH}.tar.gz" owner='microsoft' repo='vscode' -
b01 revised this gist
Jun 7, 2022 . 1 changed file with 13 additions and 14 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,20 +2,6 @@ set -e # Auto-Get the latest commit sha via command line. get_latest_release() { tag=$(curl --silent "https://api.github.com/repos/${1}/releases/latest" | # Get latest release from GitHub API @@ -46,6 +32,19 @@ get_latest_release() { printf "${sha}" } U_NAME=$(uname -m) if [ "${U_NAME}" = "aarch64" ]; then ARCH="arm64" elif [ "${U_NAME}" = "x86_64" ]; then ARCH="x64" fi # You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b" archive="vscode-server-linux-${ARCH}.tar.gz" owner='microsoft' repo='vscode' commit_sha=$(get_latest_release "${owner}/${repo}") echo "will attempt to download VS Code Server version = '${commit_sha}'" -
b01 revised this gist
Jun 7, 2022 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,12 @@ set -e U_NAME=$(uname -m) if [ "${U_NAME}" = "aarch64" ]; then ARCH="arm64" elif [ "${U_NAME}" = "x86_64" ]; then ARCH="x64" fi # You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases -
b01 revised this gist
Jun 7, 2022 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,15 @@ #!/bin/sh set -e ARCH="x64" if [ "${ARCH}" = "aarch64" ]; then ARCH="arm64" fi # You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b" archive="vscode-server-linux-${ARCH}.tar.gz" owner='microsoft' repo='vscode' @@ -23,7 +29,7 @@ get_latest_release() { grep '"type":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value if [ "${sha_type}" != "commit" ]; then combo_sha=$(curl -s "https://api.github.com/repos/${1}/git/tags/${sha}" | # Get latest release from GitHub API grep '"sha":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value -
b01 created this gist
Apr 17, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ #!/bin/sh set -e # You can get the latest commit SHA by looking at the latest tagged commit here: https://github.com/microsoft/vscode/releases commit_sha="08a217c4d27a02a5bcde898fd7981bda5b49391b" archive="vscode-server-linux-x64.tar.gz" owner='microsoft' repo='vscode' # Auto-Get the latest commit sha via command line. get_latest_release() { tag=$(curl --silent "https://api.github.com/repos/${1}/releases/latest" | # Get latest release from GitHub API grep '"tag_name":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value tag_data=$(curl --silent "https://api.github.com/repos/${1}/git/ref/tags/${tag}") sha=$(echo "${tag_data}" | # Get latest release from GitHub API grep '"sha":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value sha_type=$(echo "${tag_data}" | # Get latest release from GitHub API grep '"type":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value if [[ "${sha_type}" != "commit" ]]; then combo_sha=$(curl -s "https://api.github.com/repos/${1}/git/tags/${sha}" | # Get latest release from GitHub API grep '"sha":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value # Remove the tag sha, leaving only the commit sha; # this won't work if there are ever more than 2 sha, # and use xargs to remove whitespace/newline. sha=$(echo "${combo_sha}" | sed -E "s/${sha}//" | xargs) fi printf "${sha}" } commit_sha=$(get_latest_release "${owner}/${repo}") echo "will attempt to download VS Code Server version = '${commit_sha}'" # Download VS Code Server tarball to tmp directory. curl -L "https://update.code.visualstudio.com/commit:${commit_sha}/server-linux-x64/stable" -o "/tmp/${archive}" # Make the parent directory where the server should live. # NOTE: Ensure VS Code will have read/write access; namely the user running VScode or container user. mkdir -vp ~/.vscode-server/bin/"${commit_sha}" # Extract the tarball to the right location. tar --no-same-owner -xzv --strip-components=1 -C ~/.vscode-server/bin/"${commit_sha}" -f "/tmp/${archive}"