Archived
1
0

Rename static releases to binary releases

More clear as discussed in PR.
This commit is contained in:
Anmol Sethi
2020-05-27 15:56:18 -04:00
parent 665ca017a1
commit fa45fd0e31
13 changed files with 46 additions and 46 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-static-release.sh](./build/build-static-release.sh) (`yarn release:static`)
- [./ci/build/build-binary-release.sh](./build/build-binary-release.sh) (`yarn release:binary`)
- Requires a node module already built into `./release` with the above script.
- Will build a static release with node and node_modules bundled into `./release-static`.
- Will build a binary release with node and node_modules bundled into `./release-binary`.
- [./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 static releases to run code-server with the bundled node binary.
- [./ci/build/test-static-release.sh](./build/test-static-release.sh) (`yarn test:static-release`)
- Ensures code-server in the `./release-static` directory works by installing an extension.
- 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.
- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`)
- Packages `./release-static` into a `.tar.gz` archive in `./release-packages`.
- Packages `./release-binary` 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,8 +131,8 @@ Helps avoid clobbering the CI configuration.
- [./steps/release.sh](./steps/release.sh)
- Runs the release process.
- Generates the npm package at `./release`.
- [./steps/release-static.sh](./steps/release-static.sh)
- Takes the output of the previous script and generates a static release and
- [./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/publish-npm.sh](./steps/publish-npm.sh)
- Grabs the `npm-package` release artifact for the current commit and publishes it on npm.

View File

@ -5,8 +5,8 @@ main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
rsync "$RELEASE_PATH/" "$RELEASE_PATH-static"
RELEASE_PATH+=-static
rsync "$RELEASE_PATH/" "$RELEASE_PATH-binary"
RELEASE_PATH+=-binary
# 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

@ -2,7 +2,7 @@
set -euo pipefail
# Packages code-server for the current OS and architecture into ./release-packages.
# This script assumes that a static release is built already into ./release-static.
# This script assumes that a binary release is built already into ./release-binary
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-static/$release_name/" ./release-static
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-binary/$release_name/" ./release-binary
else
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-static/$release_name/" release-static
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-binary/$release_name/" release-binary
fi
echo "done (release-packages/$release_name)"

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
# This script is intended to be bundled into the static releases.
# This script is intended to be bundled into the binary releases.
# Runs code-server with the bundled Node binary.
# More complicated than readlink -f or realpath to support macOS.

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-static/**/*: "/usr/lib/code-server/"
./release-binary/**/*: "/usr/lib/code-server/"

View File

@ -10,18 +10,18 @@ main() {
local EXTENSIONS_DIR
EXTENSIONS_DIR="$(mktemp -d)"
echo "Testing static release"
echo "Testing binary release"
./release-static/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
./release-binary/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
local installed_extensions
installed_extensions="$(./release-static/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
installed_extensions="$(./release-binary/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 "Static release works correctly"
echo "Binary 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:static
yarn test:static-release
yarn release:binary
yarn test:binary-release
yarn package
}