Archived
1
0

Add vscode via vendor package.

- Use yarn for vscode vendoring.
- Grab hash from package.
This commit is contained in:
Teffen Ellis
2021-09-08 15:05:49 -04:00
committed by Teffen Ellis
parent 28ba59ab3c
commit f885b29675
32 changed files with 1544 additions and 251 deletions

View File

@ -12,10 +12,11 @@ KEEP_MODULES="${KEEP_MODULES-0}"
main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
VSCODE_SRC_PATH="lib/vscode"
VSCODE_OUT_PATH="$RELEASE_PATH/lib/vscode"
VSCODE_SRC_PATH="vendor/modules/code-oss-dev"
VSCODE_OUT_PATH="$RELEASE_PATH/vendor/modules/code-oss-dev"
mkdir -p "$RELEASE_PATH"
@ -24,7 +25,7 @@ main() {
rsync ./docs/README.md "$RELEASE_PATH"
rsync LICENSE.txt "$RELEASE_PATH"
rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH"
rsync ./vendor/modules/code-oss-dev/ThirdPartyNotices.txt "$RELEASE_PATH"
}
bundle_code_server() {

View File

@ -7,6 +7,7 @@ export npm_config_build_from_source=true
main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
@ -19,6 +20,7 @@ main() {
node_path="$(yarn -s node <<< 'console.info(process.execPath)')"
mkdir -p "$RELEASE_PATH/bin"
mkdir -p "$RELEASE_PATH/lib"
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
rsync "$node_path" "$RELEASE_PATH/lib/node"
@ -32,7 +34,7 @@ main() {
# leaves a few stray symlinks. Clean them up so nfpm does not fail.
# Remove this line when its no longer needed.
rm -fr "$RELEASE_PATH/lib/vscode/extensions/node_modules/.bin"
rm -fr "$RELEASE_PATH/vendor/modules/code-oss-dev/extensions/node_modules/.bin"
}
main "$@"

View File

@ -1,14 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
# Builds vscode into lib/vscode/out-vscode.
# Builds vscode into vendor/modules/code-oss-dev/out-vscode.
# MINIFY controls whether a minified version of vscode is built.
MINIFY=${MINIFY-true}
main() {
cd "$(dirname "${0}")/../.."
cd lib/vscode
cd vendor/modules/code-oss-dev
yarn gulp compile-build compile-extensions-build compile-extension-media
yarn gulp optimize --gulpfile ./coder.js

View File

@ -6,10 +6,6 @@ main() {
source ./ci/lib.sh
git clean -Xffd
pushd lib/vscode
git clean -xffd
popd
}
main "$@"

View File

@ -87,13 +87,15 @@ symlink_asar() {
}
vscode_yarn() {
cd lib/vscode
echo 'Installing vendor dependencies...'
cd vendor/modules/code-oss-dev
yarn --production --frozen-lockfile
symlink_asar
cd extensions
yarn --production --frozen-lockfile
for ext in */; do
ext="${ext%/}"
echo "extensions/$ext: installing dependencies"