Compare commits
15 Commits
2.1485-vsc
...
2.1523-vsc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22058c5f86 | ||
|
|
616bdb35f3 | ||
|
|
42f7b5d12b | ||
|
|
53818b0e36 | ||
|
|
6f08b13540 | ||
|
|
d36526b1c8 | ||
|
|
1252eb6a8a | ||
|
|
4733c31a2f | ||
|
|
17c5173d8b | ||
|
|
d0a08f6dd7 | ||
|
|
7b5d6d186b | ||
|
|
3851927396 | ||
|
|
7eececead6 | ||
|
|
b8c3d96fcd | ||
|
|
a2ee6c8e73 |
109
.travis.yml
109
.travis.yml
@@ -1,49 +1,80 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- 10.16.0
|
- 10.16.0
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
dist: trusty
|
|
||||||
env:
|
|
||||||
- VSCODE_VERSION="1.38.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="linux"
|
|
||||||
- os: linux
|
|
||||||
dist: trusty
|
|
||||||
env:
|
|
||||||
- VSCODE_VERSION="1.38.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="alpine"
|
|
||||||
- os: osx
|
|
||||||
env:
|
|
||||||
- VSCODE_VERSION="1.38.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
|
- export MAJOR_VERSION="2"
|
||||||
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
|
- export VSCODE_VERSION="1.38.1"
|
||||||
script:
|
- export VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
|
||||||
- travis_wait 30 scripts/ci.bash
|
- export TAG="$VERSION-vsc$VSCODE_VERSION"
|
||||||
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
|
||||||
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
|
||||||
|
|
||||||
|
# Don't build on tags because we'll already have built the commit.
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- name: "Linux build"
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: TARGET="linux"
|
||||||
|
if: tag IS blank
|
||||||
|
script: scripts/ci.bash
|
||||||
|
- name: "Alpine build"
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: TARGET="alpine"
|
||||||
|
if: tag IS blank
|
||||||
|
script: scripts/ci.bash
|
||||||
|
- name: "MacOS build"
|
||||||
|
os: osx
|
||||||
|
if: tag IS blank
|
||||||
|
script: travis_wait 30 scripts/ci.bash
|
||||||
|
- name: "Docker build"
|
||||||
|
os: linux
|
||||||
|
dist: trusty
|
||||||
|
env: DOCKER_BUILD="true"
|
||||||
|
if: branch == master AND tag IS blank
|
||||||
|
script: docker build --build-arg githubToken="$GITHUB_TOKEN" --build-arg codeServerVersion="$VERSION" --build-arg vscodeVersion="$VSCODE_VERSION" -t codercom/code-server:"$TAG" -t codercom/code-server:v2 .
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 3
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- echo "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
|
- echo "$TAG" "$TRAVIS_COMMIT"
|
||||||
- git config --local user.name "$USER_NAME"
|
- git config --local user.name "$USER_NAME"
|
||||||
- git config --local user.email "$USER_EMAIL"
|
- git config --local user.email "$USER_EMAIL"
|
||||||
- git tag "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
|
- if ! git tag "$TAG" "$TRAVIS_COMMIT" ; then echo "$TAG already exists"; fi
|
||||||
|
- if [[ -n "$DOCKER_BUILD" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ; fi
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
- provider: releases
|
||||||
file_glob: true
|
file_glob: true
|
||||||
draft: true
|
draft: true
|
||||||
tag_name: "$VERSION-vsc$VSCODE_VERSION"
|
tag_name: "$TAG"
|
||||||
target_commitish: "$TRAVIS_COMMIT"
|
target_commitish: "$TRAVIS_COMMIT"
|
||||||
name: "$VERSION-vsc$VSCODE_VERSION"
|
name: "$TAG"
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
api_key:
|
api_key:
|
||||||
secure: YL/x24KjYjgYXPcJWk3FV7FGxI79Mh6gBECQEcdlf3fkLEoKFVgzHBoUNWrFPzyR4tgLyWNAgcpD9Lkme1TRWTom7UPjXcwMNyLcLa+uec7ciSAnYD9ntLTpiCuPDD1u0LtRGclSi/EHQ+F8YVq+HZJpXTsJeAmOmihma3GVbGKSZr+BRum+0YZSG4w+o4TOlYzw/4bLWS52MogZcwpjd+hemBbgXLuGU2ziKv2vEKCZFbEeA16II4x1WLI4mutDdCeh7+3aLzGLwDa49NxtsVYNjyNFF75JhCTCNA55e2YMiLz9Uq69IXe/mi5F7xUaFfhIqqLNyKBnKeEOzu3dYnc+8n3LjnQ+00PmkF05nx9kBn3UfV1kwQGh6QbyDmTtBP07rtUMyI14aeQqHjxsaVRdMnwj9Q2DjXRr8UDqESZF0rmK3pHCXS2fBhIzLE8tLVW5Heiba2pQRFMHMZW+KBE97FzcFh7is90Ait3T8enfcd/PWFPYoBejDAdjwxwOkezh5N5ZkYquEfDYuWrFi6zRFCktsruaAcA+xGtTf9oilBBzUqu8Ie+YFWH5me83xakcblJWdaW/D2rLJAJH3m6LFm8lBqyUgDX5t/etob6CpDuYHu5D1J3XINOj/+aLAcadq6qlh70PMZS3zYffUu3JlzaD2amlSHIT8b5YXFc=
|
secure: YL/x24KjYjgYXPcJWk3FV7FGxI79Mh6gBECQEcdlf3fkLEoKFVgzHBoUNWrFPzyR4tgLyWNAgcpD9Lkme1TRWTom7UPjXcwMNyLcLa+uec7ciSAnYD9ntLTpiCuPDD1u0LtRGclSi/EHQ+F8YVq+HZJpXTsJeAmOmihma3GVbGKSZr+BRum+0YZSG4w+o4TOlYzw/4bLWS52MogZcwpjd+hemBbgXLuGU2ziKv2vEKCZFbEeA16II4x1WLI4mutDdCeh7+3aLzGLwDa49NxtsVYNjyNFF75JhCTCNA55e2YMiLz9Uq69IXe/mi5F7xUaFfhIqqLNyKBnKeEOzu3dYnc+8n3LjnQ+00PmkF05nx9kBn3UfV1kwQGh6QbyDmTtBP07rtUMyI14aeQqHjxsaVRdMnwj9Q2DjXRr8UDqESZF0rmK3pHCXS2fBhIzLE8tLVW5Heiba2pQRFMHMZW+KBE97FzcFh7is90Ait3T8enfcd/PWFPYoBejDAdjwxwOkezh5N5ZkYquEfDYuWrFi6zRFCktsruaAcA+xGtTf9oilBBzUqu8Ie+YFWH5me83xakcblJWdaW/D2rLJAJH3m6LFm8lBqyUgDX5t/etob6CpDuYHu5D1J3XINOj/+aLAcadq6qlh70PMZS3zYffUu3JlzaD2amlSHIT8b5YXFc=
|
||||||
file:
|
file:
|
||||||
- release/*.tar.gz
|
- release/*.tar.gz
|
||||||
- release/*.zip
|
- release/*.zip
|
||||||
on:
|
on:
|
||||||
repo: cdr/code-server
|
repo: cdr/code-server
|
||||||
branch: master
|
branch: master
|
||||||
|
|
||||||
|
- provider: script
|
||||||
|
skip_cleanup: true
|
||||||
|
script: docker push codercom/code-server:"$TAG" ; docker push codercom/code-server:v2
|
||||||
|
on:
|
||||||
|
repo: cdr/code-server
|
||||||
|
branch: master
|
||||||
|
condition: -n "$DOCKER_BUILD"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
yarn: true
|
yarn: true
|
||||||
timeout: 1000
|
timeout: 1000
|
||||||
directories:
|
directories:
|
||||||
- .cache
|
- .cache
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
FROM node:10.16.0
|
FROM node:10.16.0
|
||||||
ARG codeServerVersion=docker
|
ARG codeServerVersion=docker
|
||||||
ARG vscodeVersion
|
ARG vscodeVersion
|
||||||
|
ARG githubToken
|
||||||
|
|
||||||
# Install VS Code's deps. These are the only two it seems we need.
|
# Install VS Code's deps. These are the only two it seems we need.
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
@@ -14,7 +15,7 @@ WORKDIR /src
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN yarn \
|
RUN yarn \
|
||||||
&& MINIFY=true yarn build "${vscodeVersion}" "${codeServerVersion}" \
|
&& MINIFY=true GITHUB_TOKEN="${githubToken}" yarn build "${vscodeVersion}" "${codeServerVersion}" \
|
||||||
&& yarn binary "${vscodeVersion}" "${codeServerVersion}" \
|
&& yarn binary "${vscodeVersion}" "${codeServerVersion}" \
|
||||||
&& mv "/src/build/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64-built/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64" /src/build/code-server \
|
&& mv "/src/build/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64-built/code-server${codeServerVersion}-vsc${vscodeVersion}-linux-x86_64" /src/build/code-server \
|
||||||
&& rm -r /src/build/vscode-* \
|
&& rm -r /src/build/vscode-* \
|
||||||
|
|||||||
11
README.md
11
README.md
@@ -5,7 +5,7 @@ remote server, accessible through the browser.
|
|||||||
|
|
||||||
Try it out:
|
Try it out:
|
||||||
```bash
|
```bash
|
||||||
docker run -it -p 127.0.0.1:8080:8080 -v "${HOME}/.local/share/code-server:/home/coder/.local/share/code-server" -v "$PWD:/home/coder/project" codercom/code-server
|
docker run -it -p 127.0.0.1:8080:8080 -v "${HOME}/.local/share/code-server:/home/coder/.local/share/code-server" -v "$PWD:/home/coder/project" codercom/code-server:v2
|
||||||
```
|
```
|
||||||
|
|
||||||
- **Consistent environment:** Code on your Chromebook, tablet, and laptop with a
|
- **Consistent environment:** Code on your Chromebook, tablet, and laptop with a
|
||||||
@@ -18,6 +18,15 @@ docker run -it -p 127.0.0.1:8080:8080 -v "${HOME}/.local/share/code-server:/home
|
|||||||

|

|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
- Minimum GLIBC version of 2.17 and a minimum version of GLIBCXX of 3.4.15.
|
||||||
|
- This is the main requirement for building Visual Studio Code. We cannot go lower than this.
|
||||||
|
- A 64-bit host with at least 1GB RAM and 2 cores.
|
||||||
|
- 1 core hosts would work but not optimally.
|
||||||
|
- Docker (for Docker versions of `code-server`).
|
||||||
|
|
||||||
### Run over SSH
|
### Run over SSH
|
||||||
Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
|
Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const startVscode = async (): Promise<void | void[]> => {
|
|||||||
|
|
||||||
const server = new MainServer({
|
const server = new MainServer({
|
||||||
...options,
|
...options,
|
||||||
port: typeof args.port !== "undefined" && parseInt(args.port, 10) || 8080,
|
port: typeof args.port !== "undefined" ? parseInt(args.port, 10) : 8080,
|
||||||
socket: args.socket,
|
socket: args.socket,
|
||||||
}, args);
|
}, args);
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ const startVscode = async (): Promise<void | void[]> => {
|
|||||||
|
|
||||||
if (!server.options.socket && args.open) {
|
if (!server.options.socket && args.open) {
|
||||||
// The web socket doesn't seem to work if browsing with 0.0.0.0.
|
// The web socket doesn't seem to work if browsing with 0.0.0.0.
|
||||||
const openAddress = `http://localhost:${server.options.port}`;
|
const openAddress = serverAddress.replace(/:\/\/0.0.0.0/, "://localhost");
|
||||||
await open(openAddress).catch(console.error);
|
await open(openAddress).catch(console.error);
|
||||||
logger.info(` - Opened ${openAddress}`);
|
logger.info(` - Opened ${openAddress}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user