Skip to content

Commit 925073d

Browse files
authored
Merge pull request #2773 from cdr/upgrade-vscode-1.53
feat(vscode): update to version 1.53.2
2 parents 5f42112 + e47eabf commit 925073d

File tree

1,916 files changed

+84044
-66434
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,916 files changed

+84044
-66434
lines changed

.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
yarn --frozen-lockfile
4545
yarn test
4646
- name: Upload test artifacts
47+
if: always()
4748
uses: actions/upload-artifact@v2
4849
with:
4950
name: test-videos

ci/dev/reset-vscode.sh

-12
This file was deleted.

ci/dev/update-vscode.sh

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
main() {
5+
cd "$(dirname "$0")/../.."
6+
7+
# Check if the remote exists
8+
# if it doesn't, we add it
9+
if ! git config remote.vscode.url > /dev/null; then
10+
echo "Could not find 'vscode' as a remote"
11+
echo "Adding with: git remote add -f vscode https://github.com/microsoft/vscode.git &> /dev/null"
12+
echo "Supressing output with '&> /dev/null'"
13+
git remote add -f vscode https://github.com/microsoft/vscode.git &> /dev/null
14+
fi
15+
16+
# Ask which version we should update to
17+
# In the future, we'll automate this and grab the latest version automatically
18+
read -r -p "What version of VSCode would you like to update to? (i.e. 1.52) " VSCODE_VERSION_TO_UPDATE
19+
20+
# Check that this version exists
21+
if [[ -z $(git ls-remote --heads vscode release/"$VSCODE_VERSION_TO_UPDATE") ]]; then
22+
echo "Oops, that doesn't look like a valid version."
23+
echo "You entered: $VSCODE_VERSION_TO_UPDATE"
24+
echo "Verify that this branches exists here: https://github.com/microsoft/vscode/branches/all?query=release%2F$VSCODE_VERSION_TO_UPDATE"
25+
exit 1
26+
fi
27+
28+
echo -e "Great! We'll prep a PR for updating to $VSCODE_VERSION_TO_UPDATE\n"
29+
30+
# Check if GitHub CLI is installed
31+
if ! command -v gh &> /dev/null; then
32+
echo "GitHub CLI could not be found."
33+
echo "If you install it before you run this script next time, we'll open a draft PR for you!"
34+
echo -e "See docs here: https://github.com/cli/cli#installation\n"
35+
exit
36+
fi
37+
38+
# Push branch to remote if not already pushed
39+
# If we don't do this, the opening a draft PR step won't work
40+
# because it will stop and ask where you want to push the branch
41+
CURRENT_BRANCH=$(git branch --show-current)
42+
if [[ -z $(git ls-remote --heads origin "$CURRENT_BRANCH") ]]; then
43+
echo "Doesn't look like you've pushed this branch to remote"
44+
echo -e "Pushing now using: git push origin $CURRENT_BRANCH\n"
45+
git push origin "$CURRENT_BRANCH"
46+
fi
47+
48+
echo "Opening a draft PR on GitHub"
49+
# To read about these flags, visit the docs: https://cli.github.com/manual/gh_pr_create
50+
gh pr create --base master --title "feat(vscode): update to version $VSCODE_VERSION_TO_UPDATE" --body "This PR updates vscode to version: $VSCODE_VERSION_TO_UPDATE" --reviewer @cdr/code-server-reviewers --repo cdr/code-server --draft
51+
52+
echo "Going to try to update vscode for you..."
53+
echo -e "Running: git subtree pull --prefix lib/vscode vscode release/${VSCODE_VERSION_TO_UPDATE} --squash\n"
54+
# Try to run subtree update command
55+
git subtree pull --prefix lib/vscode vscode release/"${VSCODE_VERSION_TO_UPDATE}" --squash --message "chore(vscode): update to $VSCODE_VERSION_TO_UPDATE"
56+
}
57+
58+
main "$@"

docs/CONTRIBUTING.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [Requirements](#requirements)
77
- [Development Workflow](#development-workflow)
88
- [Updating VS Code](#updating-vs-code)
9+
- [Notes about Changes](#notes-about-changes)
910
- [Build](#build)
1011
- [Structure](#structure)
1112
- [Modifications to VS Code](#modifications-to-vs-code)
@@ -59,14 +60,18 @@ To develop inside an isolated Docker container:
5960

6061
### Updating VS Code
6162

62-
If you need to update VS Code, you can update the subtree with one line. Here's an example using the version 1.52:
63+
To update VS Code, follow these steps:
6364

64-
```shell
65-
# Add vscode as a new remote if you haven't already and fetch
66-
git remote add -f vscode https://github.com/microsoft/vscode.git
65+
1. Run `yarn update:vscode`.
66+
2. Enter a version. Ex. 1.53
67+
3. This will open a draft PR for you.
68+
4. There will be merge conflicts. First commit them.
69+
1. We do this because if we don't, it will be impossible to review your PR.
70+
5. Once they're all fixed, test code-server locally and make sure it all works.
6771

68-
git subtree pull --prefix lib/vscode vscode release/1.52 --squash --message "Update VS Code to 1.52"
69-
```
72+
#### Notes about Changes
73+
74+
- watch out for updates to `lib/vscode/src/vs/code/browser/workbench/workbench.html`. You may need to make changes to `src/browser/pages/vscode.html`
7075

7176
## Build
7277

lib/vscode/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
**/extensions/**/build/**
1515
**/extensions/markdown-language-features/media/**
1616
**/extensions/typescript-basics/test/colorize-fixtures/**
17+
**/extensions/**/dist/**
1718
# This is a code-server code symlink.
1819
src/vs/base/node/proxy_agent.ts

0 commit comments

Comments
 (0)