Skip to content

Commit 6a25b3b

Browse files
committed
Document structure better
Closes #1648
1 parent aee2599 commit 6a25b3b

File tree

8 files changed

+164
-191
lines changed

8 files changed

+164
-191
lines changed

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# code-server
22

3-
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it through the browser.
3+
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
44

5-
- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a
5+
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
66
consistent dev environment. Develop on a Linux machine and pick up from any
77
device with a web browser.
88
- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
@@ -13,7 +13,7 @@ Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and a
1313

1414
## Getting started
1515

16-
For a proper setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
16+
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
1717

1818
### Debian, Ubuntu
1919

@@ -38,10 +38,10 @@ systemctl --user enable --now code-server
3838
We recommend installing from `npm` if we don't have a precompiled release for your machine's
3939
platform or architecture.
4040

41-
**note:** Installing via `npm` requires certain dependencies for the native module builds.
41+
**note:** Installing via `npm` builds native modules on install and so requires C dependencies.
4242
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.
4343

44-
You also need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633).
44+
You will need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633).
4545

4646
```bash
4747
npm install -g code-server
@@ -75,13 +75,13 @@ docker run -it -p 127.0.0.1:8080:8080 \
7575
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
7676
They bundle the node binary and compiled native modules.
7777

78-
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases)
79-
2. Unpack the release
80-
3. You can run code-server by executing `bin/code-server`
78+
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
79+
2. Unpack the release.
80+
3. You can run code-server by executing `./bin/code-server`.
8181

82-
Add the code-server `bin` directory to your `$PATH` to easily execute it without the full path every time.
82+
Add the code-server `bin` directory to your `$PATH` to easily execute `code-server` without the full path every time.
8383

84-
Here is an example script for installing and using a self-contained code-server release on Linux:
84+
Here is an example script for installing and using a self-contained `code-server` release on Linux:
8585

8686
```bash
8787
curl -sSL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-linux-amd64.tar.gz | sudo tar -C /usr/local -xz

ci/README.md

+85-84
Original file line numberDiff line numberDiff line change
@@ -2,133 +2,134 @@
22

33
This directory contains scripts used for code-server's continuous integration infrastructure.
44

5-
Many of these scripts contain more detailed documentation and options in comments at the top.
5+
Some of these scripts contain more detailed documentation and options
6+
in header comments.
67

7-
Any file and directory added into this tree should be documented here.
8+
Any file or directory in this subdirectory should be documented here.
9+
10+
- [./ci/lib.sh](./lib.sh)
11+
- Contains code duplicated across these scripts.
812

913
## Publishing a release
1014

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

13-
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and push a commit
14-
2. GitHub actions will generate the `npm-package` and `release-packages` artifacts
17+
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and push a commit.
18+
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
1519
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
1620
the updated version.
1721
1. Summarize the major changes in the release notes and link to the relevant issues.
18-
4. Wait for the artifacts in step 2 to build
19-
5. Run `yarn release:github-assets` to download the artifacts and then upload them to the draft release
20-
6. Run some basic sanity tests on one of the released packages
21-
7. Publish the release
22-
1. CI will automatically grab the artifacts and then
23-
1. Publish the NPM package
24-
2. Publish the Docker Hub image
25-
8. Update the homebrew and AUR packages
22+
4. Wait for the artifacts in step 2 to build.
23+
5. Run `yarn release:github-assets` to download the `release-packages` artifact and then upload them to the draft release.
24+
6. Run some basic sanity tests on one of the released packages.
25+
7. Publish the release.
26+
1. CI will automatically grab the artifacts and then:
27+
1. Publish the NPM package from `npm-package`.
28+
2. Publish the Docker Hub image from `release-images`.
29+
8. Update the homebrew and AUR packages.
2630

2731
## dev
2832

2933
This directory contains scripts used for the development of code-server.
3034

31-
- [./dev/container](./dev/container)
32-
- See [CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container
33-
- [./dev/ci.sh](./dev/ci.sh) (`yarn ci`)
34-
- Runs `yarn fmt`, `yarn lint` and `yarn test`
35-
- [./dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`)
36-
- Runs formatters
37-
- [./dev/lint.sh](./dev/lint.sh) (`yarn lint`)
38-
- Runs linters
39-
- [./dev/test.sh](./dev/test.sh) (`yarn test`)
40-
- Runs tests
41-
- [./dev/vscode.sh](./dev/vscode.sh) (`yarn vscode`)
42-
- Ensures [../lib/vscode](../lib/vscode) is cloned, patched and dependencies are installed
43-
- [./dev/patch-vscode.sh](./dev/patch-vscode.sh) (`yarn vscode:patch`)
44-
- Applies [./dev/vscode.patch](./dev/vscode.patch) to [../lib/vscode](../lib/vscode)
45-
- [./dev/diff-vscode.sh](./dev/diff-vscode.sh) (`yarn vscode:diff`)
46-
- Diffs [../lib/vscode](../lib/vscode) into [./dev/vscode.patch](./dev/vscode.patch)
47-
- [./dev/vscode.patch](./dev/vscode.patch)
48-
- Our patch of VS Code to enable remote browser access
49-
- Generate it with `yarn vscode:diff` and apply with `yarn vscode:patch`
50-
- [./dev/watch.ts](./dev/watch.ts) (`yarn watch`)
51-
- Starts a process to build and launch code-server and restart on any code changes
52-
- Example usage in [CONTRIBUTING.md](../doc/CONTRIBUTING.md)
35+
- [./ci/dev/container](./dev/container)
36+
- See [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md) for docs on the development container.
37+
- [./ci/dev/fmt.sh](./dev/fmt.sh) (`yarn fmt`)
38+
- Runs formatters.
39+
- [./ci/dev/lint.sh](./dev/lint.sh) (`yarn lint`)
40+
- Runs linters.
41+
- [./ci/dev/test.sh](./dev/test.sh) (`yarn test`)
42+
- Runs tests.
43+
- [./ci/dev/ci.sh](./dev/ci.sh) (`yarn ci`)
44+
- Runs `yarn fmt`, `yarn lint` and `yarn test`.
45+
- [./ci/dev/vscode.sh](./dev/vscode.sh) (`yarn vscode`)
46+
- Ensures [./lib/vscode](../lib/vscode) is cloned, patched and dependencies are installed.
47+
- [./ci/dev/patch-vscode.sh](./dev/patch-vscode.sh) (`yarn vscode:patch`)
48+
- Applies [./ci/dev/vscode.patch](./dev/vscode.patch) to [./lib/vscode](../lib/vscode).
49+
- [./ci/dev/diff-vscode.sh](./dev/diff-vscode.sh) (`yarn vscode:diff`)
50+
- Diffs [./lib/vscode](../lib/vscode) into [./ci/dev/vscode.patch](./dev/vscode.patch).
51+
- [./ci/dev/vscode.patch](./dev/vscode.patch)
52+
- Our patch of VS Code, see [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md#vs-code-patch).
53+
- Generate it with `yarn vscode:diff` and apply with `yarn vscode:patch`.
54+
- [./ci/dev/watch.ts](./dev/watch.ts) (`yarn watch`)
55+
- Starts a process to build and launch code-server and restart on any code changes.
56+
- Example usage in [./doc/CONTRIBUTING.md](../doc/CONTRIBUTING.md).
5357

5458
## build
5559

5660
This directory contains the scripts used to build and release code-server.
5761
You can disable minification by setting `MINIFY=`.
5862

59-
- [./lib.sh](./lib.sh)
60-
- Contains code duplicated across these scripts.
61-
- [./build/build-code-server.sh](./build/build-code-server.sh) (`yarn build`)
62-
- Builds code-server into ./out and bundles the frontend into ./dist.
63-
- [./build/build-vscode.sh](./build/build-vscode.sh) (`yarn build:vscode`)
64-
- Builds vscode into ./lib/vscode/out-vscode.
65-
- [./build/build-release.sh](./build/build-release.sh) (`yarn release`)
63+
- [./ci/build/build-code-server.sh](./build/build-code-server.sh) (`yarn build`)
64+
- Builds code-server into `./out` and bundles the frontend into `./dist`.
65+
- [./ci/build/build-vscode.sh](./build/build-vscode.sh) (`yarn build:vscode`)
66+
- Builds vscode into `./lib/vscode/out-vscode`.
67+
- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`)
6668
- Bundles the output of the above two scripts into a single node module at `./release`.
67-
- [./build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`)
68-
- Requires a release already built in `./release`.
69-
- Will build a static release with node bundled into `./release-static`
70-
- [./build/clean.sh](./build/clean.sh) (`yarn clean`)
71-
- Removes all build artifacts
72-
- Will also `git reset --hard lib/vscode`
73-
- Useful to do a clean build
74-
- [./build/code-server.sh](./build/code-server.sh)
69+
- [./ci/build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`)
70+
- Requires a node module already built into `./release` with the above script.
71+
- Will build a static release with node and native modules bundled into `./release-static`.
72+
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
73+
- Removes all build artifacts.
74+
- Will also `git reset --hard lib/vscode`.
75+
- Useful to do a clean build.
76+
- [./ci/build/code-server.sh](./build/code-server.sh)
7577
- Copied into static releases to run code-server with the bundled node binary.
76-
- [./build/test-static-release.sh](./build/test-static-release.sh) (`yarn test:static-release`)
77-
- Ensures code-server in the `./release-static` directory runs
78-
- [./build/build-packages.sh](./build/build-packages.sh) (`yarn package`)
79-
- Packages `./release-static` into an archive in `./release-packages`
80-
- If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate .deb and .rpm
81-
- [./build/nfpm.yaml](./build/nfpm.yaml)
82-
- Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate .deb and .rpm
83-
- [./build/code-server-nfpm.sh](./build/code-server-nfpm.sh)
84-
- Entrypoint script for code-server for .deb and .rpm
85-
- [./build/code-server.service](./build/code-server.service)
86-
- systemd user service packaged into the debs and rpms
87-
- [./build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`)
88-
- Uses [hub](https://github.com/github/hub) to create a draft release with a template description
89-
- [./build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`)
90-
- Downloads the release-package artifacts for the current commit from CI
78+
- [./ci/build/test-static-release.sh](./build/test-static-release.sh) (`yarn test:static-release`)
79+
- Ensures code-server in the `./release-static` directory works by installing an extension.
80+
- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`)
81+
- Packages `./release-static` into a `.tar.gz` archive in `./release-packages`.
82+
- If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`.
83+
- [./ci/build/nfpm.yaml](./build/nfpm.yaml)
84+
- Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate `.deb` and `.rpm`.
85+
- [./ci/build/code-server-nfpm.sh](./build/code-server-nfpm.sh)
86+
- Entrypoint script for code-server for `.deb` and .rpm`.
87+
- [./ci/build/code-server.service](./build/code-server.service)
88+
- systemd user service packaged into the `.deb` and `.rpm`.
89+
- [./ci/build/release-github-draft.sh](./build/release-github-draft.sh) (`yarn release:github-draft`)
90+
- Uses [hub](https://github.com/github/hub) to create a draft release with a template description.
91+
- [./ci/build/release-github-assets.sh](./build/release-github-assets.sh) (`yarn release:github-assets`)
92+
- Downloads the release-package artifacts for the current commit from CI.
9193
- Uses [hub](https://github.com/github/hub) to upload the artifacts to the release
92-
specified in `package.json`
93-
- [./build/npm-postinstall.sh](./build/npm-postinstall.sh)
94-
- Post install script for the npm package
95-
- Bundled by`yarn release`
94+
specified in `package.json`.
95+
- [./ci/build/npm-postinstall.sh](./build/npm-postinstall.sh)
96+
- Post install script for the npm package.
97+
- Bundled by`yarn release`.
9698

9799
## release-container
98100

99101
This directory contains the release docker container.
100102

101103
- [./release-container/build.sh](./release-container/build.sh)
102-
- Builds the release container with the tag `codercom/code-server:$VERSION-$ARCH`
103-
- Assumes debian releases are ready in `./release-packages`
104+
- Builds the release container with the tag `codercom/code-server-$ARCH:$VERSION`.
105+
- Assumes debian releases are ready in `./release-packages`.
104106

105107
## container
106108

107109
This directory contains the container for CI.
108110

109111
## steps
110112

111-
This directory contains a few scripts used in CI.
112-
Just helps avoid clobbering the CI configuration.
113+
This directory contains the scripts used in CI.
114+
Helps avoid clobbering the CI configuration.
113115

114116
- [./steps/fmt.sh](./steps/fmt.sh)
115-
- Runs `yarn fmt` after ensuring VS Code is patched
117+
- Runs `yarn fmt` after ensuring VS Code is patched.
116118
- [./steps/lint.sh](./steps/lint.sh)
117-
- Runs `yarn lint` after ensuring VS Code is patched
119+
- Runs `yarn lint` after ensuring VS Code is patched.
118120
- [./steps/test.sh](./steps/test.sh)
119-
- Runs `yarn test` after ensuring VS Code is patched
121+
- Runs `yarn test` after ensuring VS Code is patched.
120122
- [./steps/release.sh](./steps/release.sh)
121-
- Runs the full release process
122-
- Generates the npm package at `./release`
123-
- [./steps/static-release.sh](./steps/static-release.sh)
124-
- Takes the output of the previous script and generates a static release and packages
125-
- [./steps/lib.sh](./steps/lib.sh)
126-
- Contains helpers to download artifacts from github actions workflow runs
123+
- Runs the release process.
124+
- Generates the npm package at `./release`.
125+
- [./steps/release-static.sh](./steps/release-static.sh)
126+
- Takes the output of the previous script and generates a self-contained release and
127+
release packages into `release-packages`.
127128
- [./steps/publish-npm.sh](./steps/publish-npm.sh)
128-
- Grabs the `npm-package` release artifact for the current commit and publishes it on NPM
129+
- Grabs the `npm-package` release artifact for the current commit and publishes it on npm.
129130
- [./steps/build-docker-image.sh](./steps/build-docker-image.sh)
130-
- Builds the docker image and then saves it into `./release-images/$ARCH.tar`
131+
- Builds the docker image and then saves it into `./release-images/code-server-$ARCH-$VERSION.tar`.
131132
- [./steps/push-docker-manifest.sh](./steps/push-docker-manifest.sh)
132133
- Loads all images in `./release-images` and then builds and pushes a multi architecture
133134
docker manifest for the amd64 and arm64 images to `codercom/code-server:$VERSION` and
134-
`codercom/code-server:latest`
135+
`codercom/code-server:latest`.

ci/dev/diff-vscode.sh

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ main() {
55
cd "$(dirname "$0")/../.."
66

77
cd ./lib/vscode
8+
git add -A
89
git diff HEAD > ../../ci/dev/vscode.patch
910
}
1011

ci/steps/build-docker-image.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ main() {
88
./ci/release-container/build.sh
99

1010
mkdir -p release-images
11-
docker save "codercom/code-server-$ARCH:$VERSION" > "release-images/code-server-$ARCH:$VERSION.tar"
11+
docker save "codercom/code-server-$ARCH:$VERSION" > "release-images/code-server-$ARCH-$VERSION.tar"
1212
}
1313

1414
main "$@"

0 commit comments

Comments
 (0)