2020-12-17 21:16:04 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
main() {
|
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
|
2021-09-16 21:52:51 +00:00
|
|
|
echo "Installing code-server test dependencies..."
|
2021-09-08 19:05:49 +00:00
|
|
|
|
2021-01-21 23:39:04 +00:00
|
|
|
cd test
|
2021-09-08 19:05:49 +00:00
|
|
|
yarn install
|
2021-01-21 23:39:04 +00:00
|
|
|
cd ..
|
|
|
|
|
2021-09-08 19:05:49 +00:00
|
|
|
cd vendor
|
2021-09-16 21:52:51 +00:00
|
|
|
echo "Installing vendor dependencies..."
|
2021-09-08 19:05:49 +00:00
|
|
|
|
|
|
|
# * We install in 'modules' instead of 'node_modules' because VS Code's extensions
|
|
|
|
# use a webpack config which cannot differentiate between its own node_modules
|
|
|
|
# and itself being in a directory with the same name.
|
|
|
|
#
|
|
|
|
# * We ignore scripts because NPM/Yarn's default behavior is to assume that
|
|
|
|
# devDependencies are not needed, and that even git repo based packages are
|
|
|
|
# assumed to be compiled. Because the default behavior for VS Code's `postinstall`
|
|
|
|
# assumes we're also compiled, this needs to be ignored.
|
2021-09-16 21:52:51 +00:00
|
|
|
|
|
|
|
local args=(install --modules-folder modules --ignore-scripts)
|
|
|
|
|
|
|
|
if [[ ${CI-} ]]; then
|
|
|
|
args+=("--frozen-lockfile")
|
|
|
|
fi
|
|
|
|
|
|
|
|
yarn "${args[@]}"
|
2020-12-17 21:16:04 +00:00
|
|
|
|
2021-09-08 19:05:49 +00:00
|
|
|
# Finally, run the vendor `postinstall`
|
|
|
|
yarn run postinstall
|
2020-12-17 21:16:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|