Skip to content

Commit f71d887

Browse files
committed
Rename binary release to standalone
1 parent 06c26a2 commit f71d887

13 files changed

+74
-74
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dist*
44
out*
55
release/
66
release-npm-package/
7-
release-binary/
7+
release-standalone/
88
release-packages/
99
release-gcp/
1010
release-images/

ci/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ You can disable minification by setting `MINIFY=`.
7575
- Builds vscode into `./lib/vscode/out-vscode`.
7676
- [./ci/build/build-release.sh](./build/build-release.sh) (`yarn release`)
7777
- Bundles the output of the above two scripts into a single node module at `./release`.
78-
- [./ci/build/build-binary-release.sh](./build/build-binary-release.sh) (`yarn release:binary`)
78+
- [./ci/build/build-standalone-release.sh](./build/build-standalone-release.sh) (`yarn release:standalone`)
7979
- Requires a node module already built into `./release` with the above script.
80-
- Will build a binary release with node and node_modules bundled into `./release-binary`.
80+
- Will build a standalone release with node and node_modules bundled into `./release-standalone`.
8181
- [./ci/build/clean.sh](./build/clean.sh) (`yarn clean`)
8282
- Removes all build artifacts.
8383
- Will also `git reset --hard lib/vscode`.
8484
- Useful to do a clean build.
8585
- [./ci/build/code-server.sh](./build/code-server.sh)
86-
- Copied into binary releases to run code-server with the bundled node binary.
87-
- [./ci/build/test-binary-release.sh](./build/test-binary-release.sh) (`yarn test:binary-release`)
88-
- Ensures code-server in the `./release-binary` directory works by installing an extension.
86+
- Copied into standalone releases to run code-server with the bundled node binary.
87+
- [./ci/build/test-standalone-release.sh](./build/test-standalone-release.sh) (`yarn test:standalone-release`)
88+
- Ensures code-server in the `./release-standalone` directory works by installing an extension.
8989
- [./ci/build/build-packages.sh](./build/build-packages.sh) (`yarn package`)
90-
- Packages `./release-binary` into a `.tar.gz` archive in `./release-packages`.
90+
- Packages `./release-standalone` into a `.tar.gz` archive in `./release-packages`.
9191
- If on linux, [nfpm](https://github.com/goreleaser/nfpm) is used to generate `.deb` and `.rpm`.
9292
- [./ci/build/nfpm.yaml](./build/nfpm.yaml)
9393
- Used to configure [nfpm](https://github.com/goreleaser/nfpm) to generate `.deb` and `.rpm`.
@@ -131,9 +131,9 @@ Helps avoid clobbering the CI configuration.
131131
- [./steps/release.sh](./steps/release.sh)
132132
- Runs the release process.
133133
- Generates the npm package at `./release`.
134-
- [./steps/release-binary.sh](./steps/release-binary.sh)
135-
- Takes the output of the previous script and generates a binary release and
136-
release packages into `release-packages`.
134+
- [./steps/release-packages.sh](./steps/release-packages.sh)
135+
- Takes the output of the previous script and generates a standalone release and
136+
release packages into `./release-packages`.
137137
- [./steps/publish-npm.sh](./steps/publish-npm.sh)
138138
- Grabs the `npm-package` release artifact for the current commit and publishes it on npm.
139139
- [./steps/build-docker-image.sh](./steps/build-docker-image.sh)

ci/build/build-packages.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33

44
# Packages code-server for the current OS and architecture into ./release-packages.
5-
# This script assumes that a binary release is built already into ./release-binary
5+
# This script assumes that a standalone release is built already into ./release-standalone
66

77
main() {
88
cd "$(dirname "${0}")/../.."
@@ -29,9 +29,9 @@ main() {
2929
release_archive() {
3030
local release_name="code-server-$VERSION-$OS-$ARCH"
3131
if [[ $OS == "linux" ]]; then
32-
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-binary/$release_name/" ./release-binary
32+
tar -czf "release-packages/$release_name.tar.gz" --transform "s/^\.\/release-standalone/$release_name/" ./release-standalone
3333
else
34-
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-binary/$release_name/" release-binary
34+
tar -czf "release-packages/$release_name.tar.gz" -s "/^release-standalone/$release_name/" ./release-standalone
3535
fi
3636
echo "done (release-packages/$release_name)"
3737

ci/build/build-binary-release.sh renamed to ci/build/build-standalone-release.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ main() {
55
cd "$(dirname "${0}")/../.."
66
source ./ci/lib.sh
77

8-
rsync "$RELEASE_PATH/" "$RELEASE_PATH-binary"
9-
RELEASE_PATH+=-binary
8+
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
9+
RELEASE_PATH+=-standalone
1010

1111
# We cannot find the path to node from $PATH because yarn shims a script to ensure
1212
# we use the same version it's using so we instead run a script with yarn that

ci/build/clean.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ main() {
88
rm -Rf \
99
out \
1010
release \
11-
release-binary \
11+
release-standalone \
1212
release-packages \
1313
release-gcp \
1414
release-images/ \

ci/build/code-server.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

3-
# This script is intended to be bundled into the binary releases.
4-
# Runs code-server with the bundled Node binary.
3+
# This script is intended to be bundled into the standalone releases.
4+
# Runs code-server with the bundled node binary.
55

66
# More complicated than readlink -f or realpath to support macOS.
77
# See https://github.com/cdr/code-server/issues/1537

ci/build/nfpm.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ license: "MIT"
1313
files:
1414
./ci/build/code-server-nfpm.sh: /usr/bin/code-server
1515
./ci/build/code-server.service: /usr/lib/systemd/user/code-server.service
16-
./release-binary/**/*: "/usr/lib/code-server/"
16+
./release-standalone/**/*: "/usr/lib/code-server/"

ci/build/test-binary-release.sh renamed to ci/build/test-standalone-release.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ main() {
1010
local EXTENSIONS_DIR
1111
EXTENSIONS_DIR="$(mktemp -d)"
1212

13-
echo "Testing binary release"
13+
echo "Testing standalone release."
1414

15-
./release-binary/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
15+
./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --install-extension ms-python.python
1616
local installed_extensions
17-
installed_extensions="$(./release-binary/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
17+
installed_extensions="$(./release-standalone/bin/code-server --extensions-dir "$EXTENSIONS_DIR" --list-extensions 2>&1)"
1818
if [[ $installed_extensions != "ms-python.python" ]]; then
1919
echo "Unexpected output from listing extensions:"
2020
echo "$installed_extensions"
2121
exit 1
2222
fi
2323

24-
echo "Binary release works correctly"
24+
echo "Standalone release works correctly."
2525
}
2626

2727
main "$@"

ci/steps/release-binary.sh renamed to ci/steps/release-packages.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ main() {
77
# https://github.com/actions/upload-artifact/issues/38
88
tar -xzf release-npm-package/package.tar.gz
99

10-
yarn release:binary
11-
yarn test:binary-release
10+
yarn release:standalone
11+
yarn test:standalone-release
1212
yarn package
1313
}
1414

doc/CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ yarn --production
5151
node .
5252
```
5353

54-
Now you can build binary packages with:
54+
Now you can build the packages with:
5555

5656
```
57-
yarn release:binary
58-
yarn test:binary-release
57+
yarn release:standalone
58+
yarn test:standalone-release
5959
yarn package
60-
# The binary release is in ./release-binary
61-
# .deb, .rpm and the binary archive are in ./release-packages
60+
# The standalone release is in ./release-standalone
61+
# .deb, .rpm and the standalone archive are in ./release-packages
6262
```
6363

6464
## Structure

doc/install.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- [Arch Linux](#arch-linux)
1111
- [yarn, npm](#yarn-npm)
1212
- [macOS](#macos)
13-
- [Binary Releases](#binary-releases)
13+
- [Standalone Releases](#standalone-releases)
1414
- [Docker](#docker)
1515

1616
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -50,9 +50,9 @@ commands presented in the rest of this document.
5050

5151
- `--dry-run` to echo the commands for the install process without running them.
5252
- `--method` to choose the installation method.
53-
- `--method=detect` to detect the package manager but fallback to `--method=archive`.
54-
- `--method=archive` to install a binary release archive into `~/.local`.
55-
- `--prefix=/usr/local` to install a binary release archive system wide.
53+
- `--method=detect` to detect the package manager but fallback to `--method=standalone`.
54+
- `--method=standalone` to install a standalone release archive into `~/.local`.
55+
- `--prefix=/usr/local` to install a standalone release archive system wide.
5656
- `--version=X.X.X` to install version `X.X.X` instead of latest.
5757
- `--help` to see full usage docs.
5858

@@ -61,17 +61,17 @@ commands presented in the rest of this document.
6161
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
6262
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
6363
- For Arch Linux it will install the AUR package.
64-
- For any unrecognized Linux operating system it will install the latest binary release into `~/.local`.
64+
- For any unrecognized Linux operating system it will install the latest standalone release into `~/.local`.
6565

6666
- Add `~/.local/bin` to your `$PATH` to run code-server.
6767

6868
- For macOS it will install the Homebrew package.
6969

70-
- If Homebrew is not installed it will install the latest binary release into `~/.local`.
70+
- If Homebrew is not installed it will install the latest standalone release into `~/.local`.
7171
- Add `~/.local/bin` to your `$PATH` to run code-server.
7272

73-
- If ran on an architecture with no binary releases, it will install the npm package with `yarn` or `npm`.
74-
- We only have binary releases for amd64 and arm64 presently.
73+
- If ran on an architecture with no releases, it will install the npm package with `yarn` or `npm`.
74+
- We only have releases for amd64 and arm64 presently.
7575

7676
## Debian, Ubuntu
7777

@@ -136,7 +136,7 @@ brew services start code-server
136136
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
137137
```
138138

139-
## Binary Releases
139+
## Standalone Releases
140140

141141
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
142142
They bundle the node binary and `node_modules`.
@@ -148,7 +148,7 @@ They bundle the node binary and `node_modules`.
148148
You can add the code-server `bin` directory to your `$PATH` to easily execute `code-server`
149149
without the full path every time.
150150

151-
Here is an example script for installing and using a binary `code-server` release on Linux:
151+
Here is an example script for installing and using a standalone `code-server` release on Linux:
152152

153153
```bash
154154
mkdir -p ~/.local/lib ~/.local/bin

install.sh

+32-32
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,31 @@ Usage:
2626
Echo the commands for the install process without running them.
2727
--version X.X.X
2828
Install a specific version instead of the latest.
29-
--method [detect | archive]
29+
--method [detect | standalone]
3030
Choose the installation method. Defaults to detect.
3131
- detect detects the system package manager and tries to use it.
3232
Full reference on the process is further below.
33-
- archive installs a binary release archive into ~/.local
33+
- standalone installs a standalone release archive into ~/.local
3434
Add ~/.local/bin to your \$PATH to use it.
3535
--prefix <dir>
36-
Sets the prefix used by binary release archives. Defaults to ~/.local
36+
Sets the prefix used by standalone release archives. Defaults to ~/.local
3737
The release is unarchived into ~/.local/lib/code-server-X.X.X
3838
and the binary symlinked into ~/.local/bin/code-server
3939
To install system wide pass ---prefix=/usr/local
4040
4141
- For Debian, Ubuntu and Raspbian it will install the latest deb package.
4242
- For Fedora, CentOS, RHEL and openSUSE it will install the latest rpm package.
4343
- For Arch Linux it will install the AUR package.
44-
- For any unrecognized Linux operating system it will install the latest binary
44+
- For any unrecognized Linux operating system it will install the latest standalone
4545
release into ~/.local
4646
4747
- For macOS it will install the Homebrew package.
48-
- If Homebrew is not installed it will install the latest binary release
48+
- If Homebrew is not installed it will install the latest standalone release
4949
into ~/.local
5050
51-
- If ran on an architecture with no binary releases, it will install the
51+
- If ran on an architecture with no releases, it will install the
5252
npm package with yarn or npm.
53-
- We only have binary releases for amd64 and arm64 presently.
53+
- We only have releases for amd64 and arm64 presently.
5454
5555
It will cache all downloaded assets into ~/.cache/code-server
5656
@@ -65,12 +65,12 @@ echo_latest_version() {
6565
echo "$version"
6666
}
6767

68-
echo_archive_postinstall() {
68+
echo_standalone_postinstall() {
6969
echo
7070
cat << EOF
71-
Binary release has been installed into $ARCHIVE_INSTALL_PREFIX/lib/code-server-$VERSION
71+
Standalone release has been installed into $STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION
7272
Please extend your path to use code-server:
73-
PATH="$ARCHIVE_INSTALL_PREFIX/bin:\$PATH"
73+
PATH="$STANDALONE_INSTALL_PREFIX/bin:\$PATH"
7474
Then you can run:
7575
code-server
7676
EOF
@@ -94,7 +94,7 @@ main() {
9494
unset \
9595
DRY_RUN \
9696
METHOD \
97-
ARCHIVE_INSTALL_PREFIX \
97+
STANDALONE_INSTALL_PREFIX \
9898
VERSION \
9999
OPTIONAL
100100

@@ -111,11 +111,11 @@ main() {
111111
METHOD="$(parse_arg "$@")"
112112
;;
113113
--prefix)
114-
ARCHIVE_INSTALL_PREFIX="$(parse_arg "$@")"
114+
STANDALONE_INSTALL_PREFIX="$(parse_arg "$@")"
115115
shift
116116
;;
117117
--prefix=*)
118-
ARCHIVE_INSTALL_PREFIX="$(parse_arg "$@")"
118+
STANDALONE_INSTALL_PREFIX="$(parse_arg "$@")"
119119
;;
120120
--version)
121121
VERSION="$(parse_arg "$@")"
@@ -140,12 +140,12 @@ main() {
140140

141141
VERSION="${VERSION-$(echo_latest_version)}"
142142
METHOD="${METHOD-detect}"
143-
if [ "$METHOD" != detect ] && [ "$METHOD" != archive ]; then
143+
if [ "$METHOD" != detect ] && [ "$METHOD" != standalone ]; then
144144
echoerr "Unknown install method \"$METHOD\""
145145
echoerr "Run with --help to see usage."
146146
exit 1
147147
fi
148-
ARCHIVE_INSTALL_PREFIX="${ARCHIVE_INSTALL_PREFIX-$HOME/.local}"
148+
STANDALONE_INSTALL_PREFIX="${STANDALONE_INSTALL_PREFIX-$HOME/.local}"
149149

150150
OS="$(os)"
151151
if [ ! "$OS" ]; then
@@ -157,9 +157,9 @@ main() {
157157

158158
ARCH="$(arch)"
159159
if [ ! "$ARCH" ]; then
160-
if [ "$METHOD" = archive ]; then
161-
echoerr "No binary releases available for the architecture $(uname -m)."
162-
echoerr 'Please rerun without the "--method archive" flag to install from npm.'
160+
if [ "$METHOD" = standalone ]; then
161+
echoerr "No releases available for the architecture $(uname -m)."
162+
echoerr 'Please rerun without the "--method standalone" flag to install from npm.'
163163
exit 1
164164
fi
165165
echo "No precompiled releases for $(uname -m)."
@@ -170,8 +170,8 @@ main() {
170170
CACHE_DIR="$(echo_cache_dir)"
171171
mkdir -p "$CACHE_DIR"
172172

173-
if [ "$METHOD" = archive ]; then
174-
install_archive
173+
if [ "$METHOD" = standalone ]; then
174+
install_standalone
175175
return
176176
fi
177177

@@ -190,7 +190,7 @@ main() {
190190
;;
191191
*)
192192
echo "Unsupported package manager."
193-
install_archive
193+
install_standalone
194194
;;
195195
esac
196196
}
@@ -256,7 +256,7 @@ install_macos() {
256256

257257
echo "Homebrew not installed."
258258

259-
install_archive
259+
install_standalone
260260
}
261261

262262
install_deb() {
@@ -300,31 +300,31 @@ install_aur() {
300300
echo_systemd_postinstall
301301
}
302302

303-
install_archive() {
304-
echo "Installing binary release archive v$VERSION"
303+
install_standalone() {
304+
echo "Installing standalone release archive v$VERSION"
305305
echo
306306

307307
fetch "https://github.com/cdr/code-server/releases/download/v$VERSION/code-server-$VERSION-$OS-$ARCH.tar.gz" \
308308
"$CACHE_DIR/code-server-$VERSION-$OS-$ARCH.tar.gz"
309309

310310
sh_c="sh_c"
311-
if [ ! -w "$ARCHIVE_INSTALL_PREFIX" ]; then
311+
if [ ! -w "$STANDALONE_INSTALL_PREFIX" ]; then
312312
sh_c="sudo_sh_c"
313313
fi
314314

315-
if [ -e "$ARCHIVE_INSTALL_PREFIX/lib/code-server-$VERSION" ]; then
315+
if [ -e "$STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION" ]; then
316316
echo
317-
echo "code-server-$VERSION is already installed at $ARCHIVE_INSTALL_PREFIX/lib/code-server-$VERSION"
317+
echo "code-server-$VERSION is already installed at $STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION"
318318
echo "Remove it to reinstall."
319319
exit 0
320320
fi
321321

322-
"$sh_c" mkdir -p "$ARCHIVE_INSTALL_PREFIX/lib" "$ARCHIVE_INSTALL_PREFIX/bin"
323-
"$sh_c" tar -C "$ARCHIVE_INSTALL_PREFIX/lib" -xzf "$CACHE_DIR/code-server-$VERSION-$OS-$ARCH.tar.gz"
324-
"$sh_c" mv -f "$ARCHIVE_INSTALL_PREFIX/lib/code-server-$VERSION-$OS-$ARCH" "$ARCHIVE_INSTALL_PREFIX/lib/code-server-$VERSION"
325-
"$sh_c" ln -fs "$ARCHIVE_INSTALL_PREFIX/lib/code-server-$VERSION/bin/code-server" "$ARCHIVE_INSTALL_PREFIX/bin/code-server"
322+
"$sh_c" mkdir -p "$STANDALONE_INSTALL_PREFIX/lib" "$STANDALONE_INSTALL_PREFIX/bin"
323+
"$sh_c" tar -C "$STANDALONE_INSTALL_PREFIX/lib" -xzf "$CACHE_DIR/code-server-$VERSION-$OS-$ARCH.tar.gz"
324+
"$sh_c" mv -f "$STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION-$OS-$ARCH" "$STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION"
325+
"$sh_c" ln -fs "$STANDALONE_INSTALL_PREFIX/lib/code-server-$VERSION/bin/code-server" "$STANDALONE_INSTALL_PREFIX/bin/code-server"
326326

327-
echo_archive_postinstall
327+
echo_standalone_postinstall
328328
}
329329

330330
install_npm() {

0 commit comments

Comments
 (0)