mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-29 13:38:46 +00:00
3c61d96d4f
- Fix issue where yarn lock cannot be updated in development.
38 lines
976 B
Bash
Executable File
38 lines
976 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
main() {
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
echo "Installing code-server test dependencies..."
|
|
|
|
cd test
|
|
yarn install
|
|
cd ..
|
|
|
|
cd vendor
|
|
echo "Installing vendor dependencies..."
|
|
|
|
# * 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.
|
|
|
|
local args=(install --modules-folder modules --ignore-scripts)
|
|
|
|
if [[ ${CI-} ]]; then
|
|
args+=("--frozen-lockfile")
|
|
fi
|
|
|
|
yarn "${args[@]}"
|
|
|
|
# Finally, run the vendor `postinstall`
|
|
yarn run postinstall
|
|
}
|
|
|
|
main "$@"
|