mirror of https://git.tuxpa.in/a/code-server.git
Replace Docker script with pure
This commit is contained in:
parent
d193d19756
commit
a3a6d4d701
|
@ -1,30 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
main() {
|
|
||||||
cd "$(dirname "$0")/../../.."
|
|
||||||
source ./ci/lib.sh
|
|
||||||
mkdir -p .home
|
|
||||||
|
|
||||||
docker run \
|
|
||||||
-it \
|
|
||||||
--rm \
|
|
||||||
-v "$PWD:/src" \
|
|
||||||
-e HOME="/src/.home" \
|
|
||||||
-e USER="coder" \
|
|
||||||
-e GITHUB_TOKEN \
|
|
||||||
-e MINIFY \
|
|
||||||
-w /src \
|
|
||||||
-p 127.0.0.1:8080:8080 \
|
|
||||||
-u "$(id -u):$(id -g)" \
|
|
||||||
-e CI \
|
|
||||||
"$(docker_build ./ci/images/"${IMAGE-debian10}")" \
|
|
||||||
"$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
docker_build() {
|
|
||||||
docker build "$@" >&2
|
|
||||||
docker build -q "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
|
@ -50,8 +50,8 @@ yarn watch
|
||||||
To develop inside an isolated Docker container:
|
To develop inside an isolated Docker container:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./ci/dev/image/run.sh yarn
|
pure yarn
|
||||||
./ci/dev/image/run.sh yarn watch
|
pure yarn watch
|
||||||
```
|
```
|
||||||
|
|
||||||
`yarn watch` will live reload changes to the source.
|
`yarn watch` will live reload changes to the source.
|
||||||
|
@ -63,7 +63,6 @@ If you need to update VS Code, you can update the subtree with one line. Here's
|
||||||
```shell
|
```shell
|
||||||
# Add vscode as a new remote if you haven't already and fetch
|
# Add vscode as a new remote if you haven't already and fetch
|
||||||
git remote add -f vscode https://github.com/microsoft/vscode.git
|
git remote add -f vscode https://github.com/microsoft/vscode.git
|
||||||
|
|
||||||
git subtree pull --prefix lib/vscode vscode release/1.52 --squash --message "Update VS Code to 1.52"
|
git subtree pull --prefix lib/vscode vscode release/1.52 --squash --message "Update VS Code to 1.52"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -72,41 +71,40 @@ git subtree pull --prefix lib/vscode vscode release/1.52 --squash --message "Upd
|
||||||
You can build using:
|
You can build using:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./ci/dev/image/run.sh ./ci/steps/release.sh
|
pure release
|
||||||
```
|
```
|
||||||
|
|
||||||
Run your build with:
|
This builds the release into the `release` directory. You can run this built
|
||||||
|
release directly with:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd release
|
node ./release
|
||||||
yarn --production
|
|
||||||
# Runs the built JavaScript with Node.
|
|
||||||
node .
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Build the release packages (make sure that you run `./ci/steps/release.sh` first):
|
Build the release packages (make sure that you run `pure release` first):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
IMAGE=centos7 ./ci/dev/image/run.sh ./ci/steps/release-packages.sh
|
pure package
|
||||||
# The standalone release is in ./release-standalone
|
|
||||||
# .deb, .rpm and the standalone archive are in ./release-packages
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The `release.sh` script is equal to running:
|
The standalone release will be in `./release-standalone` The `.deb`, `.rpm` and
|
||||||
|
the standalone archive will be in `./release-packages`.
|
||||||
|
|
||||||
|
Running `pure release` is equal to running:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn
|
pure yarn --frozen-lockfile
|
||||||
yarn build
|
pure yarn build
|
||||||
yarn build:vscode
|
pure yarn build:vscode
|
||||||
yarn release
|
pure yarn release
|
||||||
```
|
```
|
||||||
|
|
||||||
And `release-packages.sh` is equal to:
|
And `pure package` is equal to:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
yarn release:standalone
|
pure yarn release:standalone
|
||||||
yarn test:standalone-release
|
pure yarn test:standalone-release
|
||||||
yarn package
|
pure yarn package
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
commands:
|
||||||
|
yarn:
|
||||||
|
image: ./ci/images/centos7/Dockerfile
|
||||||
|
usage: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
env:
|
||||||
|
- YARN_CACHE=/yarn-cache # YARN_CACHE: /yarn-cache
|
||||||
|
ports:
|
||||||
|
- 8080
|
||||||
|
caches:
|
||||||
|
- key: yarn-cache
|
||||||
|
path: /yarn-cache
|
||||||
|
release:
|
||||||
|
image: ./ci/images/centos7/Dockerfile
|
||||||
|
usage: Build a release
|
||||||
|
run: ./ci/steps/release.sh
|
||||||
|
package:
|
||||||
|
image: ./ci/images/centos7/Dockerfile
|
||||||
|
usage: Package a release
|
||||||
|
run: ./ci/steps/release-packages.sh
|
Loading…
Reference in New Issue