Skip to content

fix(update-vscode): add check/docs for git-subtree #3129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion ci/dev/update-vscode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,20 @@ main() {
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 -e "See docs here: https://stedolan.github.io/jq/download/"
exit
exit 1
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
VSCODE_EXACT_VERSION=$(curl -s "https://raw.githubusercontent.com/microsoft/vscode/release/$VSCODE_VERSION_TO_UPDATE/package.json" | jq -r ".version")
Expand Down
3 changes: 3 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ To develop inside an isolated Docker container:

### 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:

1. Run `yarn update:vscode`.
Expand Down