Skip to content

Commit 8b329ca

Browse files
authored
Merge pull request #1672 from cdr/v3.3.1
Release v3.3.1
2 parents d6b1d0c + 6f13097 commit 8b329ca

File tree

7 files changed

+32
-50
lines changed

7 files changed

+32
-50
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
1818
### Debian, Ubuntu
1919

2020
```bash
21-
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.0/code-server_3.3.0_amd64.deb
22-
sudo dpkg -i code-server_3.3.0_amd64.deb
21+
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
22+
sudo dpkg -i code-server_3.3.1_amd64.deb
2323
systemctl --user enable --now code-server
2424
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
2525
```
2626

2727
### Fedora, Red Hat, SUSE
2828

2929
```bash
30-
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.0/code-server-3.3.0-amd64.rpm
31-
sudo yum install -y code-server-3.3.0-amd64.rpm
30+
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm
31+
sudo yum install -y code-server-3.3.1-amd64.rpm
3232
systemctl --user enable --now code-server
3333
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
3434
```
@@ -73,7 +73,7 @@ docker run -it -p 127.0.0.1:8080:8080 \
7373
### Static Releases
7474

7575
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
76-
They bundle the node binary and compiled native modules.
76+
They bundle the node binary and node_modules.
7777

7878
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
7979
2. Unpack the release.
@@ -84,10 +84,10 @@ Add the code-server `bin` directory to your `$PATH` to easily execute `code-serv
8484
Here is an example script for installing and using a static `code-server` release on Linux:
8585

8686
```bash
87-
curl -sSL https://github.com/cdr/code-server/releases/download/v3.3.0/code-server-3.3.0-linux-amd64.tar.gz \
87+
curl -sSL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-linux-amd64.tar.gz \
8888
| sudo tar -C /usr/local -xz
89-
sudo mv /usr/local/code-server-3.3.0-linux-amd64 /usr/local/code-server-3.3.0
90-
PATH="/usr/local/code-server-3.3.0/bin:$PATH"
89+
sudo mv /usr/local/code-server-3.3.1-linux-amd64 /usr/local/code-server-3.3.1
90+
PATH="/usr/local/code-server-3.3.1/bin:$PATH"
9191
code-server
9292
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
9393
```

ci/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Any file or directory in this subdirectory should be documented here.
1414

1515
Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub) installed.
1616

17-
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and push a commit.
17+
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and make a PR.
1818
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
1919
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
2020
the updated version.
@@ -24,7 +24,7 @@ Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub)
2424
upload them to the draft release.
2525
6. Run some basic sanity tests on one of the released packages.
2626
7. Make sure the github release tag is the commit with the artifacts.
27-
8. Publish the release.
27+
8. Publish the release and merge the PR.
2828
1. CI will automatically grab the artifacts and then:
2929
1. Publish the NPM package from `npm-package`.
3030
2. Publish the Docker Hub image from `release-images`.
@@ -70,7 +70,7 @@ You can disable minification by setting `MINIFY=`.
7070
- Bundles the output of the above two scripts into a single node module at `./release`.
7171
- [./ci/build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`)
7272
- Requires a node module already built into `./release` with the above script.
73-
- Will build a static release with node and native modules bundled into `./release-static`.
73+
- Will build a static release with node and node_modules bundled into `./release-static`.
7474
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
7575
- Removes all build artifacts.
7676
- Will also `git reset --hard lib/vscode`.

ci/build/build-release.sh

+9-22
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,14 @@ EOF
4949

5050
bundle_vscode() {
5151
mkdir -p "$VSCODE_OUT_PATH"
52-
rsync "$VSCODE_SRC_PATH/package.json" "$VSCODE_OUT_PATH"
5352
rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH"
54-
rsync "$VSCODE_SRC_PATH/node_modules" "$VSCODE_OUT_PATH"
5553
rsync "$VSCODE_SRC_PATH/out-vscode${MINIFY+-min}/" "$VSCODE_OUT_PATH/out"
54+
5655
rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions"
56+
rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules"
57+
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions"
58+
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions"
59+
rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions"
5760

5861
mkdir -p "$VSCODE_OUT_PATH/resources/linux"
5962
rsync "$VSCODE_SRC_PATH/resources/linux/code.png" "$VSCODE_OUT_PATH/resources/linux/code.png"
@@ -68,26 +71,10 @@ bundle_vscode() {
6871
EOF
6972
) > "$VSCODE_OUT_PATH/product.json"
7073

71-
pushd "$VSCODE_OUT_PATH"
72-
yarn --production --frozen-lockfile --ignore-scripts
73-
popd
74-
75-
# We clear any native module builds.
76-
local native_modules
77-
mapfile -t native_modules < <(find "$VSCODE_OUT_PATH/node_modules" -name "binding.gyp" -exec dirname {} \;)
78-
local nm
79-
for nm in "${native_modules[@]}"; do
80-
rm -R "$nm/build"
81-
done
82-
83-
# We have to rename node_modules to node_modules.bundled to avoid them being ignored by yarn.
84-
local node_modules
85-
mapfile -t node_modules < <(find "$VSCODE_OUT_PATH" -depth -name "node_modules")
86-
local nm
87-
for nm in "${node_modules[@]}"; do
88-
rm -Rf "$nm.bundled"
89-
mv "$nm" "$nm.bundled"
90-
done
74+
# We remove the scripts field so that later on we can run
75+
# yarn to fetch node_modules if necessary without build scripts running.
76+
# We cannot use --no-scripts because we still want dependant package scripts to run.
77+
jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
9178
}
9279

9380
main "$@"

ci/build/npm-postinstall.sh

+8-14
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,18 @@ main() {
2424
;;
2525
esac
2626

27-
cd lib/vscode
28-
29-
# We have to rename node_modules.bundled to node_modules.
30-
# The bundled modules were renamed originally to avoid being ignored by yarn.
31-
node_modules="$(find . -depth -name "node_modules.bundled")"
32-
for nm in $node_modules; do
33-
rm -Rf "${nm%.bundled}"
34-
mv "$nm" "${nm%.bundled}"
35-
done
36-
37-
# $npm_config_global makes npm rebuild return without rebuilding.
38-
unset npm_config_global
39-
# Rebuilds native modules.
40-
if ! npm rebuild; then
27+
if ! vscode_yarn; then
4128
echo "You may not have the required dependencies to build the native modules."
4229
echo "Please see https://github.com/cdr/code-server/blob/master/doc/npm.md"
4330
exit 1
4431
fi
4532
}
4633

34+
vscode_yarn() {
35+
cd lib/vscode
36+
yarn --production --frozen-lockfile
37+
cd extensions
38+
yarn --production --frozen-lockfile
39+
}
40+
4741
main "$@"

ci/build/release-github-draft.sh

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ main() {
99

1010
hub release create \
1111
--file - \
12+
-t "$(git rev-parse HEAD)" \
1213
--draft "${assets[@]}" "v$VERSION" << EOF
1314
v$VERSION
1415

doc/guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ SSH into your instance and run the appropriate commands documented in [README.md
8282
Assuming Debian:
8383

8484
```bash
85-
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.0/code-server_3.3.0_amd64.deb
86-
sudo dpkg -i code-server_3.3.0_amd64.deb
85+
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
86+
sudo dpkg -i code-server_3.3.1_amd64.deb
8787
systemctl --user enable --now code-server
8888
# Now code-server is running at http://127.0.0.1:8080
8989
# Your password is in ~/.config/code-server/config.yaml

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-server",
33
"license": "MIT",
4-
"version": "3.3.0",
4+
"version": "3.3.1",
55
"description": "Run VS Code on a remote server.",
66
"homepage": "https://github.com/cdr/code-server",
77
"bugs": {

0 commit comments

Comments
 (0)