mirror of https://github.com/coder/code-server.git
fix(update-vscode): add check/docs for git-subtree (#3129)
This commit is contained in:
parent
97fbbfaecc
commit
0b8a06863b
|
@ -56,9 +56,21 @@ main() {
|
||||||
echo "jq could not be found."
|
echo "jq could not be found."
|
||||||
echo "We use this when looking up the exact version to update to in the package.json in VS Code."
|
echo "We use this when looking up the exact version to update to in the package.json in VS Code."
|
||||||
echo -e "See docs here: https://stedolan.github.io/jq/download/"
|
echo -e "See docs here: https://stedolan.github.io/jq/download/"
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Note: `git subtree` returns 129 when installed, and prints help;
|
||||||
|
# but when uninstalled, returns 1.
|
||||||
|
set +e
|
||||||
|
git subtree &>/dev/null
|
||||||
|
if [ $? -ne 129 ]; then
|
||||||
|
echo "git-subtree could not be found."
|
||||||
|
echo "We use this to fetch and update the lib/vscode subtree."
|
||||||
|
echo -e "Please install git subtree."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
|
||||||
# Grab the exact version from package.json
|
# Grab the exact version from package.json
|
||||||
VSCODE_EXACT_VERSION=$(curl -s "https://raw.githubusercontent.com/microsoft/vscode/release/$VSCODE_VERSION_TO_UPDATE/package.json" | jq -r ".version")
|
VSCODE_EXACT_VERSION=$(curl -s "https://raw.githubusercontent.com/microsoft/vscode/release/$VSCODE_VERSION_TO_UPDATE/package.json" | jq -r ".version")
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,9 @@ To develop inside an isolated Docker container:
|
||||||
|
|
||||||
### Updating VS Code
|
### Updating VS Code
|
||||||
|
|
||||||
|
Updating VS Code requires `git subtree`. On some rpm-based Linux distros, `git subtree` is not included by default, and needs to be installed separately.
|
||||||
|
To install, run `dnf install git-subtree` or `yum install git-subtree` as necessary.
|
||||||
|
|
||||||
To update VS Code, follow these steps:
|
To update VS Code, follow these steps:
|
||||||
|
|
||||||
1. Run `yarn update:vscode`.
|
1. Run `yarn update:vscode`.
|
||||||
|
|
Loading…
Reference in New Issue