Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f1309795e | ||
|
|
5f94d5a687 | ||
|
|
d6b1d0c7ff | ||
|
|
ce9d14d55e | ||
|
|
eccee53142 | ||
|
|
f7f11ad6c2 | ||
|
|
0c2381f4ff | ||
|
|
e4ddffd0e2 | ||
|
|
f5ac262a2f | ||
|
|
04cd74cad0 | ||
|
|
7b1edd5ad4 | ||
|
|
47d50c9163 | ||
|
|
8a3466e86f | ||
|
|
59f0128d27 | ||
|
|
761c2035c7 | ||
|
|
094ca2ad97 | ||
|
|
c33a4651c9 | ||
|
|
783dfe0a14 | ||
|
|
b9f43c3542 | ||
|
|
65325eef89 | ||
|
|
2421cab479 | ||
|
|
ec1c74c146 |
7
.github/issue_template.md
vendored
7
.github/issue_template.md
vendored
@@ -8,4 +8,11 @@ and include any logging information relevant to the issue.
|
|||||||
Please search for existing issues before filing.
|
Please search for existing issues before filing.
|
||||||
|
|
||||||
Please ensure you cannot reproduce on VS Code before filing.
|
Please ensure you cannot reproduce on VS Code before filing.
|
||||||
|
|
||||||
|
Please fill in the issue template or we will close your issue!
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
- Web Browser:
|
||||||
|
- Local OS:
|
||||||
|
- Remote OS:
|
||||||
|
- `code-server --version`:
|
||||||
|
|||||||
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
@@ -42,7 +42,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release
|
path: ./release-npm-package
|
||||||
|
|
||||||
linux-amd64:
|
linux-amd64:
|
||||||
needs: release
|
needs: release
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release
|
path: ./release-npm-package
|
||||||
- name: Run ./ci/steps/release-static.sh
|
- name: Run ./ci/steps/release-static.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/container
|
||||||
with:
|
with:
|
||||||
@@ -73,9 +73,9 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release
|
path: ./release-npm-package
|
||||||
- name: Run ./ci/steps/release-static.sh
|
- name: Run ./ci/steps/release-static.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/container/arm64
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/release-static.sh
|
args: ./ci/steps/release-static.sh
|
||||||
- name: Upload release artifacts
|
- name: Upload release artifacts
|
||||||
@@ -93,7 +93,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: npm-package
|
name: npm-package
|
||||||
path: ./release
|
path: ./release-npm-package
|
||||||
- run: brew unlink node@12
|
- run: brew unlink node@12
|
||||||
- run: brew install node
|
- run: brew install node
|
||||||
- run: ./ci/steps/release-static.sh
|
- run: ./ci/steps/release-static.sh
|
||||||
@@ -138,7 +138,7 @@ jobs:
|
|||||||
name: release-packages
|
name: release-packages
|
||||||
path: ./release-packages
|
path: ./release-packages
|
||||||
- name: Run ./ci/steps/build-docker-image.sh
|
- name: Run ./ci/steps/build-docker-image.sh
|
||||||
uses: ./ci/container
|
uses: ./ci/container/arm64
|
||||||
with:
|
with:
|
||||||
args: ./ci/steps/build-docker-image.sh
|
args: ./ci/steps/build-docker-image.sh
|
||||||
- name: Upload release image
|
- name: Upload release image
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
dist*
|
dist*
|
||||||
out*
|
out*
|
||||||
release/
|
release/
|
||||||
|
release-npm-package/
|
||||||
release-static/
|
release-static/
|
||||||
release-packages/
|
release-packages/
|
||||||
release-gcp/
|
release-gcp/
|
||||||
|
|||||||
23
README.md
23
README.md
@@ -11,15 +11,15 @@ Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and a
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Getting started
|
## Getting Started
|
||||||
|
|
||||||
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
|
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
|
||||||
|
|
||||||
### Debian, Ubuntu
|
### Debian, Ubuntu
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server_3.3.0_amd64.deb
|
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
|
||||||
sudo dpkg -i code-server_3.3.0_amd64.deb
|
sudo dpkg -i code-server_3.3.1_amd64.deb
|
||||||
systemctl --user enable --now code-server
|
systemctl --user enable --now code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
@@ -27,8 +27,8 @@ systemctl --user enable --now code-server
|
|||||||
### Fedora, Red Hat, SUSE
|
### Fedora, Red Hat, SUSE
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm
|
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm
|
||||||
sudo yum install -y code-server-3.3.0-amd64.rpm
|
sudo yum install -y code-server-3.3.1-amd64.rpm
|
||||||
systemctl --user enable --now code-server
|
systemctl --user enable --now code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
@@ -36,7 +36,7 @@ systemctl --user enable --now code-server
|
|||||||
### npm
|
### npm
|
||||||
|
|
||||||
We recommend installing from `npm` if we don't have a precompiled release for your machine's
|
We recommend installing from `npm` if we don't have a precompiled release for your machine's
|
||||||
platform or architecture.
|
platform or architecture or your glibc < v2.19.
|
||||||
|
|
||||||
**note:** Installing via `npm` builds native modules on install and so requires C dependencies.
|
**note:** Installing via `npm` builds native modules on install and so requires C dependencies.
|
||||||
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.
|
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.
|
||||||
@@ -70,10 +70,10 @@ docker run -it -p 127.0.0.1:8080:8080 \
|
|||||||
codercom/code-server:latest
|
codercom/code-server:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Static releases
|
### Static Releases
|
||||||
|
|
||||||
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
|
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
|
||||||
They bundle the node binary and compiled native modules.
|
They bundle the node binary and node_modules.
|
||||||
|
|
||||||
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
|
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
|
||||||
2. Unpack the release.
|
2. Unpack the release.
|
||||||
@@ -84,9 +84,10 @@ Add the code-server `bin` directory to your `$PATH` to easily execute `code-serv
|
|||||||
Here is an example script for installing and using a static `code-server` release on Linux:
|
Here is an example script for installing and using a static `code-server` release on Linux:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
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
|
curl -sSL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-linux-amd64.tar.gz \
|
||||||
sudo mv /usr/local/code-server-3.3.0-linux-amd64 /usr/local/code-server
|
| sudo tar -C /usr/local -xz
|
||||||
PATH="$PATH:/usr/local/code-server/bin"
|
sudo mv /usr/local/code-server-3.3.1-linux-amd64 /usr/local/code-server-3.3.1
|
||||||
|
PATH="/usr/local/code-server-3.3.1/bin:$PATH"
|
||||||
code-server
|
code-server
|
||||||
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Any file or directory in this subdirectory should be documented here.
|
|||||||
|
|
||||||
Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub) installed.
|
Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub) installed.
|
||||||
|
|
||||||
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and push a commit.
|
1. Update the version of code-server in `package.json` and README.md/guide.md install examples and make a PR.
|
||||||
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
|
2. GitHub actions will generate the `npm-package`, `release-packages` and `release-images` artifacts.
|
||||||
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
|
3. Run `yarn release:github-draft` to create a GitHub draft release from the template with
|
||||||
the updated version.
|
the updated version.
|
||||||
@@ -23,11 +23,12 @@ Make sure you have `$GITHUB_TOKEN` set and [hub](https://github.com/github/hub)
|
|||||||
5. Run `yarn release:github-assets` to download the `release-packages` artifact and then
|
5. Run `yarn release:github-assets` to download the `release-packages` artifact and then
|
||||||
upload them to the draft release.
|
upload them to the draft release.
|
||||||
6. Run some basic sanity tests on one of the released packages.
|
6. Run some basic sanity tests on one of the released packages.
|
||||||
7. Publish the release.
|
7. Make sure the github release tag is the commit with the artifacts.
|
||||||
|
8. Publish the release and merge the PR.
|
||||||
1. CI will automatically grab the artifacts and then:
|
1. CI will automatically grab the artifacts and then:
|
||||||
1. Publish the NPM package from `npm-package`.
|
1. Publish the NPM package from `npm-package`.
|
||||||
2. Publish the Docker Hub image from `release-images`.
|
2. Publish the Docker Hub image from `release-images`.
|
||||||
8. Update the homebrew and AUR packages.
|
9. Update the homebrew and AUR packages.
|
||||||
|
|
||||||
## dev
|
## dev
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ You can disable minification by setting `MINIFY=`.
|
|||||||
- Bundles the output of the above two scripts into a single node module at `./release`.
|
- Bundles the output of the above two scripts into a single node module at `./release`.
|
||||||
- [./ci/build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`)
|
- [./ci/build/build-static-release.sh](./build/build-static-release.sh) (`yarn release:static`)
|
||||||
- Requires a node module already built into `./release` with the above script.
|
- Requires a node module already built into `./release` with the above script.
|
||||||
- Will build a static release with node and native modules bundled into `./release-static`.
|
- Will build a static release with node and node_modules bundled into `./release-static`.
|
||||||
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
|
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
|
||||||
- Removes all build artifacts.
|
- Removes all build artifacts.
|
||||||
- Will also `git reset --hard lib/vscode`.
|
- Will also `git reset --hard lib/vscode`.
|
||||||
|
|||||||
@@ -49,11 +49,14 @@ EOF
|
|||||||
|
|
||||||
bundle_vscode() {
|
bundle_vscode() {
|
||||||
mkdir -p "$VSCODE_OUT_PATH"
|
mkdir -p "$VSCODE_OUT_PATH"
|
||||||
rsync "$VSCODE_SRC_PATH/package.json" "$VSCODE_OUT_PATH"
|
|
||||||
rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH"
|
rsync "$VSCODE_SRC_PATH/yarn.lock" "$VSCODE_OUT_PATH"
|
||||||
rsync "$VSCODE_SRC_PATH/node_modules" "$VSCODE_OUT_PATH"
|
|
||||||
rsync "$VSCODE_SRC_PATH/out-vscode${MINIFY+-min}/" "$VSCODE_OUT_PATH/out"
|
rsync "$VSCODE_SRC_PATH/out-vscode${MINIFY+-min}/" "$VSCODE_OUT_PATH/out"
|
||||||
|
|
||||||
rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions"
|
rsync "$VSCODE_SRC_PATH/.build/extensions/" "$VSCODE_OUT_PATH/extensions"
|
||||||
|
rm -Rf "$VSCODE_OUT_PATH/extensions/node_modules"
|
||||||
|
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions"
|
||||||
|
rsync "$VSCODE_SRC_PATH/extensions/yarn.lock" "$VSCODE_OUT_PATH/extensions"
|
||||||
|
rsync "$VSCODE_SRC_PATH/extensions/postinstall.js" "$VSCODE_OUT_PATH/extensions"
|
||||||
|
|
||||||
mkdir -p "$VSCODE_OUT_PATH/resources/linux"
|
mkdir -p "$VSCODE_OUT_PATH/resources/linux"
|
||||||
rsync "$VSCODE_SRC_PATH/resources/linux/code.png" "$VSCODE_OUT_PATH/resources/linux/code.png"
|
rsync "$VSCODE_SRC_PATH/resources/linux/code.png" "$VSCODE_OUT_PATH/resources/linux/code.png"
|
||||||
@@ -68,26 +71,10 @@ bundle_vscode() {
|
|||||||
EOF
|
EOF
|
||||||
) > "$VSCODE_OUT_PATH/product.json"
|
) > "$VSCODE_OUT_PATH/product.json"
|
||||||
|
|
||||||
pushd "$VSCODE_OUT_PATH"
|
# We remove the scripts field so that later on we can run
|
||||||
yarn --production --frozen-lockfile --ignore-scripts
|
# yarn to fetch node_modules if necessary without build scripts running.
|
||||||
popd
|
# We cannot use --no-scripts because we still want dependant package scripts to run.
|
||||||
|
jq 'del(.scripts)' < "$VSCODE_SRC_PATH/package.json" > "$VSCODE_OUT_PATH/package.json"
|
||||||
# We clear any native module builds.
|
|
||||||
local native_modules
|
|
||||||
mapfile -t native_modules < <(find "$VSCODE_OUT_PATH/node_modules" -name "binding.gyp" -exec dirname {} \;)
|
|
||||||
local nm
|
|
||||||
for nm in "${native_modules[@]}"; do
|
|
||||||
rm -R "$nm/build"
|
|
||||||
done
|
|
||||||
|
|
||||||
# We have to rename node_modules to node_modules.bundled to avoid them being ignored by yarn.
|
|
||||||
local node_modules
|
|
||||||
mapfile -t node_modules < <(find "$VSCODE_OUT_PATH" -depth -name "node_modules")
|
|
||||||
local nm
|
|
||||||
for nm in "${node_modules[@]}"; do
|
|
||||||
rm -Rf "$nm.bundled"
|
|
||||||
mv "$nm" "$nm.bundled"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ main() {
|
|||||||
release-static \
|
release-static \
|
||||||
release-packages \
|
release-packages \
|
||||||
release-gcp \
|
release-gcp \
|
||||||
|
release-images/ \
|
||||||
dist \
|
dist \
|
||||||
.tsbuildinfo \
|
.tsbuildinfo \
|
||||||
.cache/out.tsbuildinfo
|
.cache/out.tsbuildinfo
|
||||||
|
|||||||
@@ -24,24 +24,18 @@ main() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cd lib/vscode
|
if ! vscode_yarn; then
|
||||||
|
|
||||||
# We have to rename node_modules.bundled to node_modules.
|
|
||||||
# The bundled modules were renamed originally to avoid being ignored by yarn.
|
|
||||||
node_modules="$(find . -depth -name "node_modules.bundled")"
|
|
||||||
for nm in $node_modules; do
|
|
||||||
rm -Rf "${nm%.bundled}"
|
|
||||||
mv "$nm" "${nm%.bundled}"
|
|
||||||
done
|
|
||||||
|
|
||||||
# $npm_config_global makes npm rebuild return without rebuilding.
|
|
||||||
unset npm_config_global
|
|
||||||
# Rebuilds native modules.
|
|
||||||
if ! npm rebuild; then
|
|
||||||
echo "You may not have the required dependencies to build the native modules."
|
echo "You may not have the required dependencies to build the native modules."
|
||||||
echo "Please see https://github.com/cdr/code-server/blob/master/doc/npm.md"
|
echo "Please see https://github.com/cdr/code-server/blob/master/doc/npm.md"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vscode_yarn() {
|
||||||
|
cd lib/vscode
|
||||||
|
yarn --production --frozen-lockfile
|
||||||
|
cd extensions
|
||||||
|
yarn --production --frozen-lockfile
|
||||||
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ main() {
|
|||||||
|
|
||||||
hub release create \
|
hub release create \
|
||||||
--file - \
|
--file - \
|
||||||
|
-t "$(git rev-parse HEAD)" \
|
||||||
--draft "${assets[@]}" "v$VERSION" << EOF
|
--draft "${assets[@]}" "v$VERSION" << EOF
|
||||||
v$VERSION
|
v$VERSION
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM debian
|
FROM debian:8
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
||||||
@@ -24,13 +24,23 @@ RUN apt-get install -y build-essential \
|
|||||||
RUN apt-get install -y gettext-base
|
RUN apt-get install -y gettext-base
|
||||||
|
|
||||||
# Misc build dependencies.
|
# Misc build dependencies.
|
||||||
RUN apt-get install -y jq git rsync
|
RUN apt-get install -y git rsync
|
||||||
|
|
||||||
|
# We need latest jq from debian buster for date support.
|
||||||
|
RUN ARCH="$(dpkg --print-architecture)" && \
|
||||||
|
curl -sSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
|
||||||
|
dpkg -i libonig*.deb && \
|
||||||
|
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
|
||||||
|
dpkg -i libjq*.deb && \
|
||||||
|
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
|
||||||
|
dpkg -i jq*.deb && rm *.deb
|
||||||
|
|
||||||
# Installs shellcheck.
|
# Installs shellcheck.
|
||||||
RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
|
# Unfortunately coredumps on debian:8 so disabled for now.
|
||||||
tar -xJ && \
|
#RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
|
||||||
mv shellcheck*/shellcheck /usr/local/bin && \
|
# tar -xJ && \
|
||||||
rm -R shellcheck*
|
# mv shellcheck*/shellcheck /usr/local/bin && \
|
||||||
|
# rm -R shellcheck*
|
||||||
|
|
||||||
# Install Go dependencies
|
# Install Go dependencies
|
||||||
RUN ARCH="$(dpkg --print-architecture)" && \
|
RUN ARCH="$(dpkg --print-architecture)" && \
|
||||||
|
|||||||
53
ci/container/arm64/Dockerfile
Normal file
53
ci/container/arm64/Dockerfile
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
FROM debian:9
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
# Needed for debian repositories added below.
|
||||||
|
RUN apt-get install -y curl gnupg
|
||||||
|
|
||||||
|
# Installs node.
|
||||||
|
RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - && \
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Installs yarn.
|
||||||
|
RUN curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||||
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
||||||
|
apt-get update && apt-get install -y yarn
|
||||||
|
|
||||||
|
# Installs VS Code build deps.
|
||||||
|
RUN apt-get install -y build-essential \
|
||||||
|
libsecret-1-dev \
|
||||||
|
libx11-dev \
|
||||||
|
libxkbfile-dev
|
||||||
|
|
||||||
|
# Installs envsubst.
|
||||||
|
RUN apt-get install -y gettext-base
|
||||||
|
|
||||||
|
# Misc build dependencies.
|
||||||
|
RUN apt-get install -y git rsync
|
||||||
|
|
||||||
|
# We need latest jq from debian buster for date support.
|
||||||
|
RUN ARCH="$(dpkg --print-architecture)" && \
|
||||||
|
curl -sSOL http://http.us.debian.org/debian/pool/main/libo/libonig/libonig5_6.9.1-1_$ARCH.deb && \
|
||||||
|
dpkg -i libonig*.deb && \
|
||||||
|
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/libjq1_1.5+dfsg-2+b1_$ARCH.deb && \
|
||||||
|
dpkg -i libjq*.deb && \
|
||||||
|
curl -sSOL http://http.us.debian.org/debian/pool/main/j/jq/jq_1.5+dfsg-2+b1_$ARCH.deb && \
|
||||||
|
dpkg -i jq*.deb && rm *.deb
|
||||||
|
|
||||||
|
# Installs shellcheck.
|
||||||
|
# Unfortunately coredumps on debian:8 so disabled for now.
|
||||||
|
#RUN curl -sSL https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.$(uname -m).tar.xz | \
|
||||||
|
# tar -xJ && \
|
||||||
|
# mv shellcheck*/shellcheck /usr/local/bin && \
|
||||||
|
# rm -R shellcheck*
|
||||||
|
|
||||||
|
# Install Go dependencies
|
||||||
|
RUN ARCH="$(dpkg --print-architecture)" && \
|
||||||
|
curl -sSL "https://dl.google.com/go/go1.14.3.linux-$ARCH.tar.gz" | tar -C /usr/local -xz
|
||||||
|
ENV PATH=/usr/local/go/bin:/root/go/bin:$PATH
|
||||||
|
ENV GO111MODULE=on
|
||||||
|
RUN go get mvdan.cc/sh/v3/cmd/shfmt
|
||||||
|
RUN go get github.com/goreleaser/nfpm/cmd/nfpm
|
||||||
|
|
||||||
|
RUN curl -fsSL https://get.docker.com | sh
|
||||||
6
ci/container/arm64/README.md
Normal file
6
ci/container/arm64/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# arm64
|
||||||
|
|
||||||
|
Unfortunately there is no arm64 build of `debian:8` so
|
||||||
|
we need to use `debian:9` instead.
|
||||||
|
|
||||||
|
This is just an exact copy of [../Dockerfile](../Dockerfile) with the base image change.
|
||||||
@@ -7,7 +7,10 @@ main() {
|
|||||||
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js")
|
eslint --max-warnings=0 --fix $(git ls-files "*.ts" "*.tsx" "*.js")
|
||||||
stylelint $(git ls-files "*.css")
|
stylelint $(git ls-files "*.css")
|
||||||
tsc --noEmit
|
tsc --noEmit
|
||||||
shellcheck -e SC2046,SC2164,SC2154 $(git ls-files "*.sh")
|
# See comment in ./ci/container/Dockerfile
|
||||||
|
if [[ ! ${CI-} ]]; then
|
||||||
|
shellcheck -e SC2046,SC2164,SC2154 $(git ls-files "*.sh")
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
@@ -248,19 +248,17 @@ index 1e16cde724..0000000000
|
|||||||
-target "12.4.0"
|
-target "12.4.0"
|
||||||
-runtime "node"
|
-runtime "node"
|
||||||
diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts
|
diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts
|
||||||
index e4546b2cf6..9df12239fb 100644
|
index e4546b2cf6..ad2c544e89 100644
|
||||||
--- a/src/vs/base/common/network.ts
|
--- a/src/vs/base/common/network.ts
|
||||||
+++ b/src/vs/base/common/network.ts
|
+++ b/src/vs/base/common/network.ts
|
||||||
@@ -94,16 +94,18 @@ class RemoteAuthoritiesImpl {
|
@@ -94,16 +94,17 @@ class RemoteAuthoritiesImpl {
|
||||||
if (host && host.indexOf(':') !== -1) {
|
if (host && host.indexOf(':') !== -1) {
|
||||||
host = `[${host}]`;
|
host = `[${host}]`;
|
||||||
}
|
}
|
||||||
- const port = this._ports[authority];
|
- const port = this._ports[authority];
|
||||||
+ // const port = this._ports[authority];
|
+ // const port = this._ports[authority];
|
||||||
const connectionToken = this._connectionTokens[authority];
|
const connectionToken = this._connectionTokens[authority];
|
||||||
- let query = `path=${encodeURIComponent(uri.path)}`;
|
let query = `path=${encodeURIComponent(uri.path)}`;
|
||||||
+ // NOTE@coder: Use fsPath for Windows support.
|
|
||||||
+ let query = `path=${encodeURIComponent(uri.fsPath)}`;
|
|
||||||
if (typeof connectionToken === 'string') {
|
if (typeof connectionToken === 'string') {
|
||||||
query += `&tkn=${encodeURIComponent(connectionToken)}`;
|
query += `&tkn=${encodeURIComponent(connectionToken)}`;
|
||||||
}
|
}
|
||||||
@@ -1067,7 +1065,7 @@ index 0000000000..0d2e93edae
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/vs/server/browser/worker.ts b/src/vs/server/browser/worker.ts
|
diff --git a/src/vs/server/browser/worker.ts b/src/vs/server/browser/worker.ts
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000..8db1e17c38
|
index 0000000000..a93381631a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/vs/server/browser/worker.ts
|
+++ b/src/vs/server/browser/worker.ts
|
||||||
@@ -0,0 +1,57 @@
|
@@ -0,0 +1,57 @@
|
||||||
@@ -1090,7 +1088,7 @@ index 0000000000..8db1e17c38
|
|||||||
+ scheme: self.location.protocol.replace(':', ''),
|
+ scheme: self.location.protocol.replace(':', ''),
|
||||||
+ authority: self.location.host,
|
+ authority: self.location.host,
|
||||||
+ path: self.location.pathname.replace(/\/static\/([^\/]+)\/.*$/, '/static/$1\/'),
|
+ path: self.location.pathname.replace(/\/static\/([^\/]+)\/.*$/, '/static/$1\/'),
|
||||||
+ query: `tar=${encodeURIComponent(module.extensionLocation.fsPath)}`,
|
+ query: `tar=${encodeURIComponent(module.extensionLocation.path)}`,
|
||||||
+ });
|
+ });
|
||||||
+ const response = await fetch(fetchUri.toString(true));
|
+ const response = await fetch(fetchUri.toString(true));
|
||||||
+ if (response.status !== 200) {
|
+ if (response.status !== 200) {
|
||||||
@@ -3085,11 +3083,11 @@ index afdd6bf398..1633daf93d 100644
|
|||||||
return storagePath;
|
return storagePath;
|
||||||
|
|
||||||
diff --git a/src/vs/workbench/api/worker/extHostExtensionService.ts b/src/vs/workbench/api/worker/extHostExtensionService.ts
|
diff --git a/src/vs/workbench/api/worker/extHostExtensionService.ts b/src/vs/workbench/api/worker/extHostExtensionService.ts
|
||||||
index 10a21537a4..5dcbba0913 100644
|
index 4781f22676..86c9246f51 100644
|
||||||
--- a/src/vs/workbench/api/worker/extHostExtensionService.ts
|
--- a/src/vs/workbench/api/worker/extHostExtensionService.ts
|
||||||
+++ b/src/vs/workbench/api/worker/extHostExtensionService.ts
|
+++ b/src/vs/workbench/api/worker/extHostExtensionService.ts
|
||||||
@@ -8,6 +8,9 @@ import { ExtensionActivationTimesBuilder } from 'vs/workbench/api/common/extHost
|
@@ -9,6 +9,9 @@ import { AbstractExtHostExtensionService } from 'vs/workbench/api/common/extHost
|
||||||
import { AbstractExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService';
|
import { endsWith } from 'vs/base/common/strings';
|
||||||
import { URI } from 'vs/base/common/uri';
|
import { URI } from 'vs/base/common/uri';
|
||||||
import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterceptor';
|
import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterceptor';
|
||||||
+import { joinPath } from 'vs/base/common/resources';
|
+import { joinPath } from 'vs/base/common/resources';
|
||||||
@@ -3098,7 +3096,7 @@ index 10a21537a4..5dcbba0913 100644
|
|||||||
|
|
||||||
class WorkerRequireInterceptor extends RequireInterceptor {
|
class WorkerRequireInterceptor extends RequireInterceptor {
|
||||||
|
|
||||||
@@ -40,7 +43,14 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
@@ -41,7 +44,14 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
||||||
await this._fakeModules.install();
|
await this._fakeModules.install();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3114,7 +3112,7 @@ index 10a21537a4..5dcbba0913 100644
|
|||||||
|
|
||||||
module = module.with({ path: ensureSuffix(module.path, '.js') });
|
module = module.with({ path: ensureSuffix(module.path, '.js') });
|
||||||
const response = await fetch(module.toString(true));
|
const response = await fetch(module.toString(true));
|
||||||
@@ -56,7 +66,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
@@ -57,7 +67,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
|
||||||
const _exports = {};
|
const _exports = {};
|
||||||
const _module = { exports: _exports };
|
const _module = { exports: _exports };
|
||||||
const _require = (request: string) => {
|
const _require = (request: string) => {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ main() {
|
|||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
download_artifact npm-package ./release
|
download_artifact npm-package ./release-npm-package
|
||||||
# https://github.com/actions/upload-artifact/issues/38
|
# https://github.com/actions/upload-artifact/issues/38
|
||||||
chmod +x $(grep -rl '^#!/.*' release)
|
tar -xzf release-npm-package/package.tar.gz
|
||||||
yarn publish --non-interactive release
|
yarn publish --non-interactive release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ main() {
|
|||||||
cd "$(dirname "$0")/../.."
|
cd "$(dirname "$0")/../.."
|
||||||
|
|
||||||
# https://github.com/actions/upload-artifact/issues/38
|
# https://github.com/actions/upload-artifact/issues/38
|
||||||
chmod +x $(grep -rl '^#!/.*' release)
|
tar -xzf release-npm-package/package.tar.gz
|
||||||
|
|
||||||
yarn release:static
|
yarn release:static
|
||||||
yarn test:static-release
|
yarn test:static-release
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ main() {
|
|||||||
yarn build
|
yarn build
|
||||||
yarn build:vscode
|
yarn build:vscode
|
||||||
yarn release
|
yarn release
|
||||||
|
|
||||||
|
# https://github.com/actions/upload-artifact/issues/38
|
||||||
|
mkdir -p release-npm-package
|
||||||
|
tar -czf release-npm-package/package.tar.gz release
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
- [How can I disable telemetry?](#how-can-i-disable-telemetry)
|
- [How can I disable telemetry?](#how-can-i-disable-telemetry)
|
||||||
- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open)
|
- [How does code-server decide what workspace or folder to open?](#how-does-code-server-decide-what-workspace-or-folder-to-open)
|
||||||
- [How do I debug issues with code-server?](#how-do-i-debug-issues-with-code-server)
|
- [How do I debug issues with code-server?](#how-do-i-debug-issues-with-code-server)
|
||||||
- [Heartbeat file](#heartbeat-file)
|
- [Heartbeat File](#heartbeat-file)
|
||||||
- [How does the config file work?](#how-does-the-config-file-work)
|
- [How does the config file work?](#how-does-the-config-file-work)
|
||||||
- [Enterprise](#enterprise)
|
- [Enterprise](#enterprise)
|
||||||
|
|
||||||
@@ -192,13 +192,13 @@ Once this is done, replicate the issue you're having then collect logging
|
|||||||
information from the following places:
|
information from the following places:
|
||||||
|
|
||||||
1. stdout
|
1. stdout
|
||||||
2. The most recently created directory in the `~/.local/share/code-server/logs` directory
|
2. The most recently created directory in the `~/.local/share/code-server/logs` directory.
|
||||||
3. The browser console and network tabs.
|
3. The browser console and network tabs.
|
||||||
|
|
||||||
Additionally, collecting core dumps (you may need to enable them first) if
|
Additionally, collecting core dumps (you may need to enable them first) if
|
||||||
code-server crashes can be helpful.
|
code-server crashes can be helpful.
|
||||||
|
|
||||||
## Heartbeat file
|
## Heartbeat File
|
||||||
|
|
||||||
`code-server` touches `~/.local/share/code-server/heartbeat` once a minute as long
|
`code-server` touches `~/.local/share/code-server/heartbeat` once a minute as long
|
||||||
as there is an active browser connection.
|
as there is an active browser connection.
|
||||||
@@ -229,6 +229,8 @@ and no TLS. Any flags passed to `code-server` will take priority over the config
|
|||||||
|
|
||||||
The `--config` flag or `$CODE_SERVER_CONFIG` can be used to change the config file's location.
|
The `--config` flag or `$CODE_SERVER_CONFIG` can be used to change the config file's location.
|
||||||
|
|
||||||
|
The default location also respects `$XDG_CONFIG_HOME`.
|
||||||
|
|
||||||
## Enterprise
|
## Enterprise
|
||||||
|
|
||||||
Visit [our enterprise page](https://coder.com) for more information about our
|
Visit [our enterprise page](https://coder.com) for more information about our
|
||||||
|
|||||||
10
doc/guide.md
10
doc/guide.md
@@ -18,7 +18,11 @@
|
|||||||
This guide demonstrates how to setup and use code-server.
|
This guide demonstrates how to setup and use code-server.
|
||||||
To reiterate, code-server lets you run VS Code on a remote server and then access it via a browser.
|
To reiterate, code-server lets you run VS Code on a remote server and then access it via a browser.
|
||||||
|
|
||||||
See [README.md](../README.md) for a general overview and [FAQ.md](./FAQ.md) for further user docs.
|
Further docs are at:
|
||||||
|
|
||||||
|
- [README.md](../README.md) for a general overview
|
||||||
|
- [FAQ.md](./FAQ.md) for common questions.
|
||||||
|
- [CONTRIBUTING.md](../doc/CONTRIBUTING.md) for development docs
|
||||||
|
|
||||||
We'll walk you through acquiring a remote machine to run code-server on and then exposing `code-server` so you can
|
We'll walk you through acquiring a remote machine to run code-server on and then exposing `code-server` so you can
|
||||||
securely access it.
|
securely access it.
|
||||||
@@ -78,8 +82,8 @@ SSH into your instance and run the appropriate commands documented in [README.md
|
|||||||
Assuming Debian:
|
Assuming Debian:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server_3.3.0_amd64.deb
|
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
|
||||||
sudo dpkg -i code-server_3.3.0_amd64.deb
|
sudo dpkg -i code-server_3.3.1_amd64.deb
|
||||||
systemctl --user enable --now code-server
|
systemctl --user enable --now code-server
|
||||||
# Now code-server is running at http://127.0.0.1:8080
|
# Now code-server is running at http://127.0.0.1:8080
|
||||||
# Your password is in ~/.config/code-server/config.yaml
|
# Your password is in ~/.config/code-server/config.yaml
|
||||||
|
|||||||
Submodule lib/vscode updated: 19c1c8ac0a...5763d909d5
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "code-server",
|
"name": "code-server",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"description": "Run VS Code on a remote server.",
|
"description": "Run VS Code on a remote server.",
|
||||||
"homepage": "https://github.com/cdr/code-server",
|
"homepage": "https://github.com/cdr/code-server",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Readable } from "stream"
|
|||||||
import * as tarFs from "tar-fs"
|
import * as tarFs from "tar-fs"
|
||||||
import * as zlib from "zlib"
|
import * as zlib from "zlib"
|
||||||
import { HttpProvider, HttpResponse, Route } from "../http"
|
import { HttpProvider, HttpResponse, Route } from "../http"
|
||||||
|
import { pathToFsPath } from "../util"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static file HTTP provider. Regular static requests (the path is the request
|
* Static file HTTP provider. Regular static requests (the path is the request
|
||||||
@@ -18,7 +19,7 @@ export class StaticHttpProvider extends HttpProvider {
|
|||||||
|
|
||||||
if (typeof route.query.tar === "string") {
|
if (typeof route.query.tar === "string") {
|
||||||
this.ensureAuthenticated(request)
|
this.ensureAuthenticated(request)
|
||||||
return this.getTarredResource(request, route.query.tar)
|
return this.getTarredResource(request, pathToFsPath(route.query.tar))
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await this.getReplacedResource(route)
|
const response = await this.getReplacedResource(route)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { generateUuid } from "../../common/util"
|
|||||||
import { Args } from "../cli"
|
import { Args } from "../cli"
|
||||||
import { HttpProvider, HttpProviderOptions, HttpResponse, Route } from "../http"
|
import { HttpProvider, HttpProviderOptions, HttpResponse, Route } from "../http"
|
||||||
import { settings } from "../settings"
|
import { settings } from "../settings"
|
||||||
|
import { pathToFsPath } from "../util"
|
||||||
|
|
||||||
export class VscodeHttpProvider extends HttpProvider {
|
export class VscodeHttpProvider extends HttpProvider {
|
||||||
private readonly serverRootPath: string
|
private readonly serverRootPath: string
|
||||||
@@ -151,7 +152,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
|||||||
case "/resource":
|
case "/resource":
|
||||||
case "/vscode-remote-resource":
|
case "/vscode-remote-resource":
|
||||||
if (typeof route.query.path === "string") {
|
if (typeof route.query.path === "string") {
|
||||||
return this.getResource(route.query.path)
|
return this.getResource(pathToFsPath(route.query.path))
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "/webview":
|
case "/webview":
|
||||||
|
|||||||
@@ -217,3 +217,51 @@ export function extend(...args: any[]): any {
|
|||||||
}
|
}
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Taken from vs/base/common/charCode.ts. Copied for now instead of importing so
|
||||||
|
* we don't have to set up a `vs` alias to be able to import with types (since
|
||||||
|
* the alternative is to directly import from `out`).
|
||||||
|
*/
|
||||||
|
const enum CharCode {
|
||||||
|
Slash = 47,
|
||||||
|
A = 65,
|
||||||
|
Z = 90,
|
||||||
|
a = 97,
|
||||||
|
z = 122,
|
||||||
|
Colon = 58,
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compute `fsPath` for the given uri.
|
||||||
|
* Taken from vs/base/common/uri.ts. It's not imported to avoid also importing
|
||||||
|
* everything that file imports.
|
||||||
|
*/
|
||||||
|
export function pathToFsPath(path: string, keepDriveLetterCasing = false): string {
|
||||||
|
const isWindows = process.platform === "win32"
|
||||||
|
const uri = { authority: undefined, path, scheme: "file" }
|
||||||
|
let value: string
|
||||||
|
if (uri.authority && uri.path.length > 1 && uri.scheme === "file") {
|
||||||
|
// unc path: file://shares/c$/far/boo
|
||||||
|
value = `//${uri.authority}${uri.path}`
|
||||||
|
} else if (
|
||||||
|
uri.path.charCodeAt(0) === CharCode.Slash &&
|
||||||
|
((uri.path.charCodeAt(1) >= CharCode.A && uri.path.charCodeAt(1) <= CharCode.Z) ||
|
||||||
|
(uri.path.charCodeAt(1) >= CharCode.a && uri.path.charCodeAt(1) <= CharCode.z)) &&
|
||||||
|
uri.path.charCodeAt(2) === CharCode.Colon
|
||||||
|
) {
|
||||||
|
if (!keepDriveLetterCasing) {
|
||||||
|
// windows drive letter: file:///c:/far/boo
|
||||||
|
value = uri.path[1].toLowerCase() + uri.path.substr(2)
|
||||||
|
} else {
|
||||||
|
value = uri.path.substr(1)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// other path
|
||||||
|
value = uri.path
|
||||||
|
}
|
||||||
|
if (isWindows) {
|
||||||
|
value = value.replace(/\//g, "\\")
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user