Archived
1
0

Rename binary release to standalone

This commit is contained in:
Anmol Sethi
2020-05-27 16:39:17 -04:00
parent 06c26a22cd
commit f71d8875d0
13 changed files with 74 additions and 74 deletions

View File

@ -75,19 +75,19 @@ You can disable minification by setting `MINIFY=`.
- Builds vscode into `./lib/vscode/out-vscode`.
- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`)
- Bundles the output of the above two scripts into a single node module at `./release`.
- [./ci/build/build-binary-release.sh](./build/build-binary-release.sh) (`yarn release:binary`)
- [./ci/build/build-standalone-release.sh](./build/build-standalone-release.sh) (`yarn release:standalone`)
- Requires a node module already built into `./release` with the above script.
- Will build a binary release with node and node_modules bundled into `./release-binary`.
- Will build a standalone release with node and node_modules bundled into `./release-standalone`.
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
- Removes all build artifacts.
- Will also `git reset --hard lib/vscode`.
- Useful to do a clean build.
- [./ci/build/code-server.sh](./build/code-server.sh)
- Copied into binary releases to run code-server with the bundled node binary.
- [./ci/build/test-binary-release.sh](./build/test-binary-release.sh) (`yarn test:binary-release`)
- Ensures code-server in the `./release-binary` directory works by installing an extension.
- Copied into standalone releases to run code-server with the bundled node binary.
- [./ci/build/test-standalone-release.sh](./build/test-standalone-release.sh) (`yarn test:standalone-release`)
- Ensures code-server in the `./release-standalone` directory works by installing an extension.
- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`)
- Packages `./release-binary` into a `.tar.gz` archive in `./release-packages`.
- Packages `./release-standalone` into a `.tar.gz` archive in `./release-packages`.
- If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`.
- [./ci/build/nfpm.yaml](./build/nfpm.yaml)
- Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate `.deb` and `.rpm`.
@ -131,9 +131,9 @@ Helps avoid clobbering the CI configuration.
- [./steps/release.sh](./steps/release.sh)
- Runs the release process.
- Generates the npm package at `./release`.
- [./steps/release-binary.sh](./steps/release-binary.sh)
- Takes the output of the previous script and generates a binary release and
release packages into `release-packages`.
- [./steps/release-packages.sh](./steps/release-packages.sh)
- Takes the output of the previous script and generates a standalone release and
release packages into `./release-packages`.
- [./steps/publish-npm.sh](./steps/publish-npm.sh)
- Grabs the `npm-package` release artifact for the current commit and publishes it on npm.
- [./steps/build-docker-image.sh](./steps/build-docker-image.sh)

View File

@ -2,7 +2,7 @@
set -euo pipefail
# Packages code-server for the current OS and architecture into ./release-packages.
# This script assumes that a binary release is built already into ./release-binary
# This script assumes that a standalone release is built already into ./release-standalone
main() {
cd "$(dirname "${0}")/../.."
@ -29,9 +29,9 @@ main() {
release_archive() {
local release_name="code-server-$VERSION-$OS-$ARCH"
if [[ $OS == "linux" ]]; then
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-binary/$release_name/" ./release-binary
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
else
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-binary/$release_name/" release-binary
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" ./release-standalone
fi
echo "done (release-packages/$release_name)"

View File

@ -5,8 +5,8 @@ main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
rsync "$RELEASE_PATH/" "$RELEASE_PATH-binary"
RELEASE_PATH+=-binary
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
RELEASE_PATH+=-standalone
# We cannot find the path to node from $PATH because yarn shims a script to ensure
# we use the same version it's using so we instead run a script with yarn that

View File

@ -8,7 +8,7 @@ main() {
rm -Rf \
out \
release \
release-binary \
release-standalone \
release-packages \
release-gcp \
release-images/ \

View File

@ -1,7 +1,7 @@
#!/bin/sh
# This script is intended to be bundled into the binary releases.
# Runs code-server with the bundled Node binary.
# This script is intended to be bundled into the standalone releases.
# Runs code-server with the bundled node binary.
# More complicated than readlink -f or realpath to support macOS.
# See https://github.com/cdr/code-server/issues/1537

View File

@ -13,4 +13,4 @@ license: "MIT"
files:
./ci/build/code-server-nfpm.sh: /usr/bin/code-server
./ci/build/code-server.service: /usr/lib/systemd/user/code-server.service
./release-binary/**/*: "/usr/lib/code-server/"
./release-standalone/**/*: "/usr/lib/code-server/"

View File

@ -10,18 +10,18 @@ main() {
local EXTENSIONS_DIR
EXTENSIONS_DIR="$(mktemp -d)"
echo "Testing binary release"
echo "Testing standalone release."
./release-binary/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
local installed_extensions
installed_extensions="$(./release-binary/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
installed_extensions="$(./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
if [[ $installed_extensions != "ms-python.python" ]]; then
echo "Unexpected output from listing extensions:"
echo "$installed_extensions"
exit 1
fi
echo "Binary release works correctly"
echo "Standalone release works correctly."
}
main "$@"

View File

@ -7,8 +7,8 @@ main() {
# https://github.com/actions/upload-artifact/issues/38
tar -xzf release-npm-package/package.tar.gz
yarn release:binary
yarn test:binary-release
yarn release:standalone
yarn test:standalone-release
yarn package
}