mirror of
https://github.com/coder/code-server.git
synced 2026-06-28 12:57:38 +02:00
Compare commits
18 Commits
fd3b7a1204
...
v4.121.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2114937ec6 | ||
|
|
cd1586214e | ||
|
|
51bc3c0f09 | ||
|
|
3c3f87a3d2 | ||
|
|
174b7757a5 | ||
|
|
359b40d422 | ||
|
|
ef7ea3e515 | ||
|
|
190b09cc76 | ||
|
|
53d981a724 | ||
|
|
89ca02c1f7 | ||
|
|
2fafe8771d | ||
|
|
41c9ed499b | ||
|
|
1605d68709 | ||
|
|
93ce398e28 | ||
|
|
62a552d896 | ||
|
|
bd41dca064 | ||
|
|
3dbddaaadf | ||
|
|
58491f317f |
39
.github/workflows/publish.yaml
vendored
39
.github/workflows/publish.yaml
vendored
@@ -70,6 +70,11 @@ jobs:
|
|||||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
ref: "master"
|
ref: "master"
|
||||||
|
|
||||||
|
- name: Configure git
|
||||||
|
run: |
|
||||||
|
git config --global user.name cdrci
|
||||||
|
git config --global user.email opensource@coder.com
|
||||||
|
|
||||||
- name: Fetch and reset master
|
- name: Fetch and reset master
|
||||||
run: |
|
run: |
|
||||||
git remote add upstream https://github.com/coder/code-server-aur.git
|
git remote add upstream https://github.com/coder/code-server-aur.git
|
||||||
@@ -77,11 +82,6 @@ jobs:
|
|||||||
git reset --hard upstream/master
|
git reset --hard upstream/master
|
||||||
git push --force
|
git push --force
|
||||||
|
|
||||||
- name: Configure git
|
|
||||||
run: |
|
|
||||||
git config --global user.name cdrci
|
|
||||||
git config --global user.email opensource@coder.com
|
|
||||||
|
|
||||||
- name: Validate package
|
- name: Validate package
|
||||||
uses: heyhusen/archlinux-package-action@c9f94059ccbebe8710d31d582f33ef4e84fe575c # v3.0.0
|
uses: heyhusen/archlinux-package-action@c9f94059ccbebe8710d31d582f33ef4e84fe575c # v3.0.0
|
||||||
with:
|
with:
|
||||||
@@ -136,3 +136,32 @@ jobs:
|
|||||||
out-file-path: "release-packages"
|
out-file-path: "release-packages"
|
||||||
|
|
||||||
- run: npm run publish:docker
|
- run: npm run publish:docker
|
||||||
|
|
||||||
|
repo:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
|
TAG: ${{ inputs.version || github.ref_name }}
|
||||||
|
needs: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set version to tag without leading v
|
||||||
|
run: |
|
||||||
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
|
||||||
|
- run: ./ci/build/update-repo.sh
|
||||||
|
|
||||||
|
- name: Open PR
|
||||||
|
run: |
|
||||||
|
git config --global user.name cdrci
|
||||||
|
git config --global user.email opensource@coder.com
|
||||||
|
git checkout -b "helm/$VERSION"
|
||||||
|
git add .
|
||||||
|
git commit -m "Update to $VERSION"
|
||||||
|
git push -u origin "$(git branch --show)"
|
||||||
|
gh pr create \
|
||||||
|
--repo coder/code-server \
|
||||||
|
--body-file .cache/checklist \
|
||||||
|
--title "Update to $VERSION"
|
||||||
|
|||||||
33
.github/workflows/release.yaml
vendored
33
.github/workflows/release.yaml
vendored
@@ -6,6 +6,11 @@ on:
|
|||||||
version:
|
version:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # For creating releases.
|
contents: write # For creating releases.
|
||||||
@@ -21,6 +26,9 @@ jobs:
|
|||||||
package-linux:
|
package-linux:
|
||||||
name: ${{ format('linux-{0}', matrix.vscode_arch) }}
|
name: ${{ format('linux-{0}', matrix.vscode_arch) }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
if: >-
|
||||||
|
(github.event_name == 'workflow_dispatch') ||
|
||||||
|
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'update/'))
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -39,7 +47,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||||
TAG: ${{ inputs.version || github.ref_name }}
|
TAG: ${{ inputs.version || github.event.pull_request.head.ref || github.ref_name }}
|
||||||
# Set release package name.
|
# Set release package name.
|
||||||
ARCH: ${{ matrix.package_arch }}
|
ARCH: ${{ matrix.package_arch }}
|
||||||
# Cross-compile target.
|
# Cross-compile target.
|
||||||
@@ -64,9 +72,10 @@ jobs:
|
|||||||
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
|
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Set version to tag without leading v
|
- name: Strip update/ and v from tag
|
||||||
run: |
|
run: |
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
version=${TAG#update/}
|
||||||
|
echo "VERSION=${version#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
with:
|
with:
|
||||||
@@ -99,12 +108,18 @@ jobs:
|
|||||||
if: ${{ matrix.vscode_arch == 'x64' }}
|
if: ${{ matrix.vscode_arch == 'x64' }}
|
||||||
- run: tar -czf package.tar.gz release
|
- run: tar -czf package.tar.gz release
|
||||||
if: ${{ matrix.vscode_arch == 'x64' }}
|
if: ${{ matrix.vscode_arch == 'x64' }}
|
||||||
|
- run: |
|
||||||
|
sed "/^## Unreleased/,/^## / ! d" CHANGELOG.md | head -n -2 | tail -n +3 > .cache/release-notes
|
||||||
|
if: ${{ matrix.vscode_arch == 'x64' }}
|
||||||
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
||||||
if: ${{ matrix.vscode_arch == 'x64' }}
|
if: ${{ matrix.vscode_arch == 'x64' }}
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
files: package.tar.gz
|
files: package.tar.gz
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
|
name: v${{ env.VERSION }}
|
||||||
|
body_path: .cache/release-notes
|
||||||
|
|
||||||
# Platform-specific release.
|
# Platform-specific release.
|
||||||
- run: KEEP_MODULES=1 npm run release
|
- run: KEEP_MODULES=1 npm run release
|
||||||
@@ -114,10 +129,15 @@ jobs:
|
|||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
files: ./release-packages/*
|
files: ./release-packages/*
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
|
name: v${{ env.VERSION }}
|
||||||
|
|
||||||
package-macos:
|
package-macos:
|
||||||
name: ${{ matrix.vscode_target }}
|
name: ${{ matrix.vscode_target }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
if: >-
|
||||||
|
(github.event_name == 'workflow_dispatch') ||
|
||||||
|
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'update/'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -144,9 +164,10 @@ jobs:
|
|||||||
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
|
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Set version to tag without leading v
|
- name: Strip update/ and v from tag
|
||||||
run: |
|
run: |
|
||||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
version=${TAG#update/}
|
||||||
|
echo "VERSION=${version#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
with:
|
with:
|
||||||
@@ -172,3 +193,5 @@ jobs:
|
|||||||
draft: true
|
draft: true
|
||||||
discussion_category_name: "📣 Announcements"
|
discussion_category_name: "📣 Announcements"
|
||||||
files: ./release-packages/*
|
files: ./release-packages/*
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
|
name: v${{ env.VERSION }}
|
||||||
|
|||||||
2
.github/workflows/trivy-docker.yaml
vendored
2
.github/workflows/trivy-docker.yaml
vendored
@@ -18,8 +18,6 @@ on:
|
|||||||
- .github/workflows/trivy-docker.yaml
|
- .github/workflows/trivy-docker.yaml
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# Run at 10:15 am UTC (3:15am PT/5:15am CT)
|
|
||||||
# Run at 0 minutes 0 hours of every day.
|
|
||||||
- cron: "15 10 * * *"
|
- cron: "15 10 * * *"
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|||||||
72
.github/workflows/update.yaml
vendored
Normal file
72
.github/workflows/update.yaml
vendored
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
name: Update code-server
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
schedule:
|
||||||
|
- cron: "0 16,21 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
TAG: ${{ inputs.version }}
|
||||||
|
GH_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Fetch latest tag
|
||||||
|
if: env.TAG == ''
|
||||||
|
run: |
|
||||||
|
tag=$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://github.com/microsoft/vscode/releases/latest)
|
||||||
|
tag="${tag#https://github.com/microsoft/vscode/releases/tag/}"
|
||||||
|
echo "TAG=$tag" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Remove leading v from tag
|
||||||
|
run: |
|
||||||
|
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Check current version
|
||||||
|
id: check
|
||||||
|
run: |
|
||||||
|
commit="$(git -C lib/vscode rev-parse HEAD)"
|
||||||
|
if [[ $(git -C lib/vscode ls-remote --tags | grep "$commit") == */"$VERSION" ]] ; then
|
||||||
|
echo "$VERSION update has already been merged into $(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
echo done=true >> $GITHUB_OUTPUT
|
||||||
|
elif git ls-remote --exit-code --heads origin "update/$VERSION" ; then
|
||||||
|
echo "There is already a PR for updating to $VERSION"
|
||||||
|
echo done=true >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "$VERSION update has not started yet"
|
||||||
|
echo done=false >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # latest
|
||||||
|
if: steps.check.outputs.done == 'false'
|
||||||
|
with:
|
||||||
|
packages: quilt
|
||||||
|
version: 1.0
|
||||||
|
|
||||||
|
- run: ./ci/build/update-vscode.sh
|
||||||
|
if: steps.check.outputs.done == 'false'
|
||||||
|
|
||||||
|
- name: Open PR
|
||||||
|
if: steps.check.outputs.done == 'false'
|
||||||
|
run: |
|
||||||
|
git config --global user.name cdrci
|
||||||
|
git config --global user.email opensource@coder.com
|
||||||
|
git checkout -b "update/$VERSION"
|
||||||
|
git add .
|
||||||
|
git commit -m "Update Code to $VERSION"
|
||||||
|
git push -u origin "$(git branch --show)"
|
||||||
|
gh pr create \
|
||||||
|
--repo coder/code-server \
|
||||||
|
--title "Update Code to $VERSION" \
|
||||||
|
--body-file .cache/checklist \
|
||||||
|
--draft
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,6 +11,7 @@ node_modules
|
|||||||
.home
|
.home
|
||||||
coverage
|
coverage
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
|
*.bak
|
||||||
|
|
||||||
# Code packages itself here.
|
# Code packages itself here.
|
||||||
/lib/vscode-reh-web-*
|
/lib/vscode-reh-web-*
|
||||||
|
|||||||
@@ -22,6 +22,12 @@ Code v99.99.999
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
Code v1.121.0
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Update to Code 1.121.0
|
||||||
|
|
||||||
## [4.118.0](https://github.com/coder/code-server/releases/tag/v4.118.0) - 2026-05-06
|
## [4.118.0](https://github.com/coder/code-server/releases/tag/v4.118.0) - 2026-05-06
|
||||||
|
|
||||||
Code v1.118.0
|
Code v1.118.0
|
||||||
|
|||||||
46
ci/build/update-repo.sh
Executable file
46
ci/build/update-repo.sh
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
function update_helm() {
|
||||||
|
local current
|
||||||
|
current=$(yq .version ci/helm-chart/Chart.yaml)
|
||||||
|
local next
|
||||||
|
next=$(semver "$current" -i minor)
|
||||||
|
echo "Bumping version from $current to $next..."
|
||||||
|
sed -i.bak "s/^version: $current\$/version: $next/" ci/helm-chart/Chart.yaml
|
||||||
|
|
||||||
|
echo "Setting app version and image to $version..."
|
||||||
|
sed -i.bak "s/^appVersion: .\+\$/appVersion: $version/" ci/helm-chart/Chart.yaml
|
||||||
|
sed -i.bak "s/^ tag: .\+\$/ tag: '$version'/" ci/helm-chart/values.yaml
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_changelog() {
|
||||||
|
local date
|
||||||
|
date=$(printf '%(%Y-%m-%d)T\n' -1)
|
||||||
|
local link="https://github.com/coder/code-server/releases/tag/v$version"
|
||||||
|
sed -i.bak "s|## Unreleased|## Unreleased\n\n## [$version]($link) - $date|" CHANGELOG.md
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
cd "$(dirname "${0}")/../.."
|
||||||
|
|
||||||
|
source ./ci/lib.sh
|
||||||
|
|
||||||
|
local version=${VERSION:-$(git describe --tags)}
|
||||||
|
version="${version#v}"
|
||||||
|
|
||||||
|
declare -a steps
|
||||||
|
|
||||||
|
steps+=(
|
||||||
|
"Update Helm chart" "update_helm"
|
||||||
|
"Update changelog" "update_changelog"
|
||||||
|
)
|
||||||
|
|
||||||
|
run-steps "${steps[@]}"
|
||||||
|
|
||||||
|
# This step is always manual.
|
||||||
|
echo "- [ ] https://github.com/coder/code-server-aur/pulls" >> .cache/checklist
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
function remove_patches() {
|
function unapply_patches() {
|
||||||
local -i exit_code=0
|
local -i exit_code=0
|
||||||
quilt pop -af || exit_code=$?
|
quiet quilt pop -af || exit_code=$?
|
||||||
case $exit_code in
|
case $exit_code in
|
||||||
# Sucessfully removed.
|
# Sucessfully unapplied.
|
||||||
0) ;;
|
0) ;;
|
||||||
# No more patches to remove.
|
# No more patches to unapply.
|
||||||
2) ;;
|
2) ;;
|
||||||
# Some error.
|
# Some error.
|
||||||
*) return $exit_code ;;
|
*) return $exit_code ;;
|
||||||
@@ -17,19 +17,19 @@ function remove_patches() {
|
|||||||
|
|
||||||
function update_vscode() {
|
function update_vscode() {
|
||||||
pushd lib/vscode
|
pushd lib/vscode
|
||||||
if ! git checkout "$VERSION" ; then
|
if ! git checkout 2>&1 "$target_vscode_version" ; then
|
||||||
echo "$VERSION does not exist locally, fetching..."
|
echo "$target_vscode_version does not exist locally, fetching..."
|
||||||
git fetch --all --prune
|
git fetch --all --prune --tags
|
||||||
git checkout "$VERSION"
|
echo "Checking out $target_vscode_version again..."
|
||||||
|
git checkout "$target_vscode_version"
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
function refresh_patches() {
|
function refresh_patches() {
|
||||||
local -i exit_code=0
|
local -i exit_code=0
|
||||||
while quilt push ; ! (( exit_code=$? )) ; do
|
while quiet quilt push ; ! (( exit_code=$? )) ; do
|
||||||
quilt refresh
|
quilt refresh
|
||||||
echo # Extra new line for separation.
|
|
||||||
done
|
done
|
||||||
case $exit_code in
|
case $exit_code in
|
||||||
# No more patches to apply.
|
# No more patches to apply.
|
||||||
@@ -42,8 +42,8 @@ function refresh_patches() {
|
|||||||
function update_node() {
|
function update_node() {
|
||||||
local node_version
|
local node_version
|
||||||
node_version=$(cat .node-version)
|
node_version=$(cat .node-version)
|
||||||
if [[ $node_version == $target_node_version ]] ; then
|
if [[ $node_version == "$target_node_version" ]] ; then
|
||||||
echo "$node_version already matches $target_node_version"
|
echo "Already set to $target_node_version"
|
||||||
else
|
else
|
||||||
echo "Updating from $node_version to $target_node_version..."
|
echo "Updating from $node_version to $target_node_version..."
|
||||||
echo "$target_node_version" > .node-version
|
echo "$target_node_version" > .node-version
|
||||||
@@ -52,26 +52,37 @@ function update_node() {
|
|||||||
|
|
||||||
function get-webview-script-hash() {
|
function get-webview-script-hash() {
|
||||||
local html
|
local html
|
||||||
html=$(<$1)
|
html=$(<"$1")
|
||||||
local start_tag='<script async type="module">'
|
local start_tag='<script async type="module">'
|
||||||
local end_tag="</script>"
|
local end_tag="</script>"
|
||||||
html=${html##*$start_tag}
|
html=${html##*"$start_tag"}
|
||||||
html=${html%%$end_tag*}
|
html=${html%%"$end_tag"*}
|
||||||
echo -n "$html" | openssl sha256 -binary | openssl base64
|
echo -n "$html" | openssl sha256 -binary | openssl base64
|
||||||
}
|
}
|
||||||
|
|
||||||
function update_csp() {
|
function update_csp() {
|
||||||
local -i exit_code=0
|
local current
|
||||||
# Move back to the webview patch so it can be refreshed.
|
current=$(quilt top 2>/dev/null || echo "")
|
||||||
quilt pop webview || exit_code=$?
|
local patch_action=""
|
||||||
case $exit_code in
|
echo "Currently at ${current:-base}"
|
||||||
# Successfully moved.
|
if [[ $current != */webview.diff ]] ; then
|
||||||
0) ;;
|
echo "Moving to patches/webview.diff..."
|
||||||
# Already at the patch.
|
local -i exit_code=0
|
||||||
2) ;;
|
if quilt applied 2>/dev/null | grep --quiet webview.diff ; then
|
||||||
# Some error.
|
quiet quilt pop webview || exit_code=$?
|
||||||
*) return $exit_code ;;
|
patch_action=pop
|
||||||
esac
|
else
|
||||||
|
quiet quilt push webview || exit_code=$?
|
||||||
|
patch_action=push
|
||||||
|
fi
|
||||||
|
case $exit_code in
|
||||||
|
# Successfully moved.
|
||||||
|
0) ;;
|
||||||
|
# Some error.
|
||||||
|
*) return $exit_code ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
local file=lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
local file=lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
|
||||||
local hash
|
local hash
|
||||||
hash=$(get-webview-script-hash "$file")
|
hash=$(get-webview-script-hash "$file")
|
||||||
@@ -79,43 +90,24 @@ function update_csp() {
|
|||||||
# Use octothorpe as a delimiter since the hash may contain a slash.
|
# Use octothorpe as a delimiter since the hash may contain a slash.
|
||||||
sed -i.bak "s#script-src 'sha256-[^']\+'#script-src 'sha256-$hash'#" "$file"
|
sed -i.bak "s#script-src 'sha256-[^']\+'#script-src 'sha256-$hash'#" "$file"
|
||||||
quilt refresh
|
quilt refresh
|
||||||
# Get patched back up.
|
|
||||||
quilt push -a
|
|
||||||
}
|
|
||||||
|
|
||||||
function run() {
|
if [[ $patch_action != "" ]] ; then
|
||||||
local -i failed=0
|
echo "Moving back to ${current:-base}..."
|
||||||
rm -f .cache/checklist
|
case $patch_action in
|
||||||
while (( $# )) ; do
|
pop) quiet quilt push "$current" ;;
|
||||||
local name=$1 ; shift
|
push) quiet quilt pop "${current:--a}" ;;
|
||||||
local fn=$1 ; shift
|
esac
|
||||||
# Only run if an earlier step has not failed.
|
|
||||||
if [[ $failed == 0 ]] ; then
|
|
||||||
echo "[+] $name..."
|
|
||||||
if $fn ; then
|
|
||||||
echo "- [X] $name" >> .cache/checklist
|
|
||||||
else
|
|
||||||
((failed++))
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
# For all failed steps, write out an empty checkbox.
|
|
||||||
if [[ $failed != 0 ]] ; then
|
|
||||||
echo "- [ ] $name" >> .cache/checklist
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ $failed != 0 ]] ; then
|
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_changelog() {
|
function add_changelog() {
|
||||||
local file=CHANGELOG.md
|
local file=CHANGELOG.md
|
||||||
if grep "Code $VERSION" "$file" ; then
|
if grep --quiet "Code $target_vscode_version" "$file" ; then
|
||||||
echo "Changelog for $VERSION already exists"
|
echo "Changelog for $target_vscode_version already exists"
|
||||||
else
|
else
|
||||||
# TODO: This is not exactly robust. In particular, it needs to handle if
|
# TODO: This is not exactly robust. In particular, it needs to handle if
|
||||||
# there is already a "changed" section.
|
# there is already a "changed" section.
|
||||||
sed -i.bak "s/## Unreleased/## Unreleased\n\nCode v$VERSION\n\n### Changed\n\n- Update to Code $VERSION/" "$file"
|
sed -i.bak "s/## Unreleased/## Unreleased\n\nCode v$target_vscode_version\n\n### Changed\n\n- Update to Code $target_vscode_version/" "$file"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,21 +120,33 @@ function main() {
|
|||||||
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
|
target_node_version=$(grep target lib/vscode/remote/.npmrc | awk -F= '{print $2}' | tr -d '"')
|
||||||
|
|
||||||
declare -a steps
|
declare -a steps
|
||||||
# Removing patches only needs to be done locally; in CI we start from a fresh
|
|
||||||
# clone each time.
|
# If version is not set, assume we are already at the target version and the
|
||||||
if [[ ! ${CI-} ]] ; then
|
# user is just trying to resolve conflics.
|
||||||
steps+=("Remove patches" "remove_patches")
|
local target_vscode_version
|
||||||
|
if [[ ${VERSION-} ]] ; then
|
||||||
|
# Removing patches only needs to be done locally; in CI we start from a
|
||||||
|
# fresh clone each time.
|
||||||
|
if [[ ! ${CI-} ]] ; then
|
||||||
|
steps+=("Unapplying patches" "unapply_patches")
|
||||||
|
fi
|
||||||
|
target_vscode_version="${VERSION#v}"
|
||||||
|
steps+=(
|
||||||
|
"Update Code to $target_vscode_version" "update_vscode"
|
||||||
|
"Refresh Code patches" "refresh_patches"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
target_vscode_version="$(git -C lib/vscode describe --tags --exact-match)"
|
||||||
|
echo "Detected Code version $target_vscode_version"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
steps+=(
|
steps+=(
|
||||||
"Update VS Code to $VERSION" "update_vscode"
|
|
||||||
"Refresh VS Code patches" "refresh_patches"
|
|
||||||
"Set Node version to $target_node_version" "update_node"
|
"Set Node version to $target_node_version" "update_node"
|
||||||
"Update CSP webview hash" "update_csp"
|
"Update CSP webview hash" "update_csp"
|
||||||
"Add changelog note" "add_changelog"
|
"Add changelog note" "add_changelog"
|
||||||
)
|
)
|
||||||
|
|
||||||
run "${steps[@]}"
|
run-steps "${steps[@]}"
|
||||||
|
|
||||||
# This step is always manual.
|
# This step is always manual.
|
||||||
echo "- [ ] Verify changelog" >> .cache/checklist
|
echo "- [ ] Verify changelog" >> .cache/checklist
|
||||||
|
|||||||
37
ci/lib.sh
37
ci/lib.sh
@@ -78,6 +78,43 @@ nodeArch() {
|
|||||||
echo "$cpu"
|
echo "$cpu"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run-steps() {
|
||||||
|
local -i failed=0
|
||||||
|
mkdir -p .cache
|
||||||
|
rm -f .cache/checklist
|
||||||
|
while (( $# )) ; do
|
||||||
|
local name=$1 ; shift
|
||||||
|
local fn=$1 ; shift
|
||||||
|
# Only run if an earlier step has not failed.
|
||||||
|
if [[ $failed == 0 ]] ; then
|
||||||
|
echo "$name..."
|
||||||
|
if $fn | indent ; then
|
||||||
|
echo "- [X] $name" >> .cache/checklist
|
||||||
|
else
|
||||||
|
((failed++))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# For all failed steps, write out an empty checkbox.
|
||||||
|
if [[ $failed != 0 ]] ; then
|
||||||
|
echo "- [ ] $name" >> .cache/checklist
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ $failed != 0 ]] ; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
quiet() {
|
||||||
|
"$@" >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
indent() {
|
||||||
|
local count=2
|
||||||
|
local space
|
||||||
|
space=$(printf "%${count}s")
|
||||||
|
sed "s/^/$space| /g"
|
||||||
|
}
|
||||||
|
|
||||||
# See gulpfile.reh.ts for available targets.
|
# See gulpfile.reh.ts for available targets.
|
||||||
if [[ ! ${VSCODE_TARGET-} ]]; then
|
if [[ ! ${VSCODE_TARGET-} ]]; then
|
||||||
VSCODE_TARGET="$(nodeOS)-$(nodeArch)"
|
VSCODE_TARGET="$(nodeOS)-$(nodeArch)"
|
||||||
|
|||||||
@@ -93,17 +93,20 @@ commits first if you are doing this).
|
|||||||
|
|
||||||
### Version updates to Code
|
### Version updates to Code
|
||||||
|
|
||||||
1. Remove any patches with `quilt pop -a`.
|
PRs will be automatically created with updates to VS Code. If a patch cannot be
|
||||||
2. Update the `lib/vscode` submodule to the desired upstream version branch.
|
automatically resolved, it will be necessary to clone the branch, resolve the
|
||||||
1. `cd lib/vscode && git checkout release/1.66 && cd ../..`
|
conflicts manually, and finish the update. To do this:
|
||||||
2. `git add lib && git commit -m "chore: update to Code <version>"`
|
|
||||||
3. Apply the patches one at a time (`quilt push`). If the application succeeds
|
1. Apply as many patches as possible `quilt push -a`.
|
||||||
but the lines changed, update the patch with `quilt refresh`. If there are
|
2. Once you hit a conflict, force apply with `quilt push -f`, manually add back
|
||||||
conflicts, then force apply with `quilt push -f`, manually add back the
|
the rejected code, then run `quilt refresh`.
|
||||||
rejected code, then run `quilt refresh`.
|
3. Once all patches have been resolved, run `./ci/build/update.sh` to finish the
|
||||||
4. From the code-server **project root**, run `npm install`.
|
update process.
|
||||||
5. Check the Node.js version that's used by Electron (which is shipped with VS
|
4. Commit all changes, push them up to the branch, and update the checklist in
|
||||||
Code. If necessary, update our version of Node.js to match.
|
the PR description.
|
||||||
|
|
||||||
|
Once the PR is ready, manually verify that the unreleased changelog section
|
||||||
|
contains all the changes going into this version before merging.
|
||||||
|
|
||||||
### Patching Code
|
### Patching Code
|
||||||
|
|
||||||
|
|||||||
Submodule lib/vscode updated: 8b640eef5a...987c959751
@@ -78,7 +78,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/argv.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/argv.ts
|
||||||
+++ code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
|
+++ code-server/lib/vscode/src/vs/platform/environment/common/argv.ts
|
||||||
@@ -149,6 +149,7 @@ export interface NativeParsedArgs {
|
@@ -146,6 +146,7 @@ export interface NativeParsedArgs {
|
||||||
'disable-chromium-sandbox'?: boolean;
|
'disable-chromium-sandbox'?: boolean;
|
||||||
sandbox?: boolean;
|
sandbox?: boolean;
|
||||||
'enable-coi'?: boolean;
|
'enable-coi'?: boolean;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Index: code-server/lib/vscode/build/lib/extensions.ts
|
|||||||
import vzip from 'gulp-vinyl-zip';
|
import vzip from 'gulp-vinyl-zip';
|
||||||
|
|
||||||
import { createRequire } from 'module';
|
import { createRequire } from 'module';
|
||||||
@@ -487,6 +488,116 @@ export function packageCopilotExtensionS
|
@@ -492,6 +493,116 @@ export function packageCopilotExtensionS
|
||||||
).pipe(util2.setExecutableBit(['**/*.sh']));
|
).pipe(util2.setExecutableBit(['**/*.sh']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
|||||||
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
|
import { ProtocolConstants } from '../../base/parts/ipc/common/ipc.net.js';
|
||||||
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
|
||||||
import { ConfigurationService } from '../../platform/configuration/common/configurationService.js';
|
import { ConfigurationService } from '../../platform/configuration/common/configurationService.js';
|
||||||
@@ -301,6 +301,9 @@ export async function setupServerService
|
@@ -358,6 +358,9 @@ export async function setupServerService
|
||||||
|
|
||||||
socketServer.registerChannel('mcpManagement', new McpManagementChannel(mcpManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)));
|
socketServer.registerChannel('mcpManagement', new McpManagementChannel(mcpManagementService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority)));
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ Index: code-server/lib/vscode/src/vs/platform/environment/common/environmentServ
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts
|
--- code-server.orig/lib/vscode/src/vs/platform/environment/common/environmentService.ts
|
||||||
+++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts
|
+++ code-server/lib/vscode/src/vs/platform/environment/common/environmentService.ts
|
||||||
@@ -112,7 +112,7 @@ export abstract class AbstractNativeEnvi
|
@@ -98,7 +98,7 @@ export abstract class AbstractNativeEnvi
|
||||||
return URI.file(join(vscodePortable, 'argv.json'));
|
return URI.file(join(vscodePortable, 'argv.json'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -116,6 +117,7 @@ export interface ServerParsedArgs {
|
@@ -120,6 +121,7 @@ export interface ServerParsedArgs {
|
||||||
'disable-file-downloads'?: boolean;
|
'disable-file-downloads'?: boolean;
|
||||||
'disable-file-uploads'?: boolean;
|
'disable-file-uploads'?: boolean;
|
||||||
'disable-getting-started-override'?: boolean,
|
'disable-getting-started-override'?: boolean,
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -110,6 +112,8 @@ export interface ServerParsedArgs {
|
@@ -114,6 +116,8 @@ export interface ServerParsedArgs {
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check'?: boolean;
|
'disable-update-check'?: boolean;
|
||||||
'auth'?: string;
|
'auth'?: string;
|
||||||
@@ -207,7 +207,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||||
@@ -41,6 +41,9 @@ export const EmbedderIdentifierContext =
|
@@ -40,6 +40,9 @@ export const EmbedderIdentifierContext =
|
||||||
|
|
||||||
export const InAutomationContext = new RawContextKey<boolean>('inAutomation', false, localize('inAutomation', "Whether VS Code is running under automation/smoke test"));
|
export const InAutomationContext = new RawContextKey<boolean>('inAutomation', false, localize('inAutomation', "Whether VS Code is running under automation/smoke test"));
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
|||||||
import { IEditorOpenContext, IEditorSerializer } from '../../../common/editor.js';
|
import { IEditorOpenContext, IEditorSerializer } from '../../../common/editor.js';
|
||||||
import { IWebviewElement, IWebviewService } from '../../webview/browser/webview.js';
|
import { IWebviewElement, IWebviewService } from '../../webview/browser/webview.js';
|
||||||
import './gettingStartedColors.js';
|
import './gettingStartedColors.js';
|
||||||
@@ -925,6 +925,72 @@ export class GettingStartedPage extends
|
@@ -928,6 +928,72 @@ export class GettingStartedPage extends
|
||||||
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
|
$('p.subtitle.description', {}, localize({ key: 'gettingStarted.editingEvolved', comment: ['Shown as subtitle on the Welcome page.'] }, "Editing evolved"))
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/welcomeGettingStarted/bro
|
|||||||
const leftColumn = $('.categories-column.categories-column-left', {},);
|
const leftColumn = $('.categories-column.categories-column-left', {},);
|
||||||
const rightColumn = $('.categories-column.categories-column-right', {},);
|
const rightColumn = $('.categories-column.categories-column-right', {},);
|
||||||
|
|
||||||
@@ -974,6 +1040,9 @@ export class GettingStartedPage extends
|
@@ -977,6 +1043,9 @@ export class GettingStartedPage extends
|
||||||
recentList.setLimit(5);
|
recentList.setLimit(5);
|
||||||
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||||
}
|
}
|
||||||
@@ -189,7 +189,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -114,6 +115,7 @@ export interface ServerParsedArgs {
|
@@ -118,6 +119,7 @@ export interface ServerParsedArgs {
|
||||||
'auth'?: string;
|
'auth'?: string;
|
||||||
'disable-file-downloads'?: boolean;
|
'disable-file-downloads'?: boolean;
|
||||||
'disable-file-uploads'?: boolean;
|
'disable-file-uploads'?: boolean;
|
||||||
@@ -234,7 +234,7 @@ Index: code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
--- code-server.orig/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||||
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
+++ code-server/lib/vscode/src/vs/workbench/common/contextkeys.ts
|
||||||
@@ -43,6 +43,7 @@ export const InAutomationContext = new R
|
@@ -42,6 +42,7 @@ export const InAutomationContext = new R
|
||||||
|
|
||||||
export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true);
|
export const IsEnabledFileDownloads = new RawContextKey<boolean>('isEnabledFileDownloads', true, true);
|
||||||
export const IsEnabledFileUploads = new RawContextKey<boolean>('isEnabledFileUploads', true, true);
|
export const IsEnabledFileUploads = new RawContextKey<boolean>('isEnabledFileUploads', true, true);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -108,6 +109,7 @@ export const serverOptions: OptionDescri
|
@@ -112,6 +113,7 @@ export const serverOptions: OptionDescri
|
||||||
export interface ServerParsedArgs {
|
export interface ServerParsedArgs {
|
||||||
/* ----- code-server ----- */
|
/* ----- code-server ----- */
|
||||||
'disable-update-check'?: boolean;
|
'disable-update-check'?: boolean;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
|
|||||||
import { NullPolicyService } from '../../platform/policy/common/policy.js';
|
import { NullPolicyService } from '../../platform/policy/common/policy.js';
|
||||||
import { OneDataSystemAppender } from '../../platform/telemetry/node/1dsAppender.js';
|
import { OneDataSystemAppender } from '../../platform/telemetry/node/1dsAppender.js';
|
||||||
import { LoggerService } from '../../platform/log/node/loggerService.js';
|
import { LoggerService } from '../../platform/log/node/loggerService.js';
|
||||||
@@ -174,11 +176,23 @@ export async function setupServerService
|
@@ -176,11 +178,23 @@ export async function setupServerService
|
||||||
const requestService = new RequestService('remote', configurationService, environmentService, logService);
|
const requestService = new RequestService('remote', configurationService, environmentService, logService);
|
||||||
services.set(IRequestService, requestService);
|
services.set(IRequestService, requestService);
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -118,6 +119,7 @@ export interface ServerParsedArgs {
|
@@ -122,6 +123,7 @@ export interface ServerParsedArgs {
|
||||||
'disable-file-uploads'?: boolean;
|
'disable-file-uploads'?: boolean;
|
||||||
'disable-getting-started-override'?: boolean,
|
'disable-getting-started-override'?: boolean,
|
||||||
'locale'?: string
|
'locale'?: string
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverEnvironmentService.ts
|
|||||||
|
|
||||||
/* ----- server setup ----- */
|
/* ----- server setup ----- */
|
||||||
|
|
||||||
@@ -104,6 +106,8 @@ export const serverOptions: OptionDescri
|
@@ -108,6 +110,8 @@ export const serverOptions: OptionDescri
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ServerParsedArgs {
|
export interface ServerParsedArgs {
|
||||||
|
|||||||
Reference in New Issue
Block a user