2020-12-17 15:16:04 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
2022-03-14 21:37:29 -05:00
|
|
|
# Install dependencies in $1.
|
|
|
|
|
install-deps() {
|
2026-11-20 21:38:16 +11:00
|
|
|
local args=(install)
|
2022-03-14 21:37:29 -05:00
|
|
|
if [[ ${CI-} ]]; then
|
2026-11-20 21:38:16 +11:00
|
|
|
args+=(--frozen-lockfile)
|
2022-03-14 21:37:29 -05:00
|
|
|
fi
|
2026-11-20 21:38:16 +11:00
|
|
|
# If there is no package.json then pnpm will look upward and end up installing
|
2022-03-14 21:37:29 -05:00
|
|
|
# from the root resulting in an infinite loop (this can happen if you have not
|
|
|
|
|
# checked out the submodule yet for example).
|
|
|
|
|
if [[ ! -f "$1/package.json" ]]; then
|
|
|
|
|
echo "$1/package.json is missing; did you run git submodule update --init?"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
pushd "$1"
|
2026-11-20 21:38:16 +11:00
|
|
|
echo "Running 'pnpm ${args[*]}' in $PWD"
|
|
|
|
|
pnpm "${args[@]}"
|
2022-03-14 21:37:29 -05:00
|
|
|
popd
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-17 15:16:04 -06:00
|
|
|
main() {
|
|
|
|
|
cd "$(dirname "$0")/../.."
|
2022-01-04 15:02:25 -06:00
|
|
|
source ./ci/lib.sh
|
2020-12-17 15:16:04 -06:00
|
|
|
|
2022-03-14 21:37:29 -05:00
|
|
|
install-deps test
|
|
|
|
|
install-deps test/e2e/extensions/test-extension
|
2022-06-24 11:33:38 -05:00
|
|
|
# We don't need these when running the integration tests
|
|
|
|
|
# so you can pass SKIP_SUBMODULE_DEPS
|
|
|
|
|
if [[ ! ${SKIP_SUBMODULE_DEPS-} ]]; then
|
|
|
|
|
install-deps lib/vscode
|
|
|
|
|
fi
|
2020-12-17 15:16:04 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
main "$@"
|