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:
|
||||
|
||||
```shell
|
||||
./ci/dev/image/run.sh yarn
|
||||
./ci/dev/image/run.sh yarn watch
|
||||
pure yarn
|
||||
pure yarn watch
|
||||
```
|
||||
|
||||
`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
|
||||
# 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 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:
|
||||
|
||||
```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
|
||||
cd release
|
||||
yarn --production
|
||||
# Runs the built JavaScript with Node.
|
||||
node .
|
||||
node ./release
|
||||
```
|
||||
|
||||
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
|
||||
IMAGE=centos7 ./ci/dev/image/run.sh ./ci/steps/release-packages.sh
|
||||
# The standalone release is in ./release-standalone
|
||||
# .deb, .rpm and the standalone archive are in ./release-packages
|
||||
pure package
|
||||
```
|
||||
|
||||
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
|
||||
yarn
|
||||
yarn build
|
||||
yarn build:vscode
|
||||
yarn release
|
||||
pure yarn --frozen-lockfile
|
||||
pure yarn build
|
||||
pure yarn build:vscode
|
||||
pure yarn release
|
||||
```
|
||||
|
||||
And `release-packages.sh` is equal to:
|
||||
And `pure package` is equal to:
|
||||
|
||||
```shell
|
||||
yarn release:standalone
|
||||
yarn test:standalone-release
|
||||
yarn package
|
||||
pure yarn release:standalone
|
||||
pure yarn test:standalone-release
|
||||
pure yarn package
|
||||
```
|
||||
|
||||
## 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