mirror of
https://github.com/coder/code-server.git
synced 2024-12-29 04:34:00 +03:00
a1af9e2a56
* Move integration types into code-server This will be easier to maintain than to have it as a patch. * Disable connection token Using a flag means we will not need to patch it out. I think this is new from 1.64? * Add product.json to build process This way we do not have to patch it. * Ship with remote agent package.json Instead of the root one. This contains fewer dependencies. * Let Code handle errors This way we will not have to patch Code to make this work and I think it makes sense to let Code handle the request. If we do want to handle errors we can do it cleanly by patching their error handler to throw instead. * Move manifest override into code-server This way we will not have to patch it. * Move to patches - Switch submodule to track upstream - Add quilt to the process - Add patches The node-* ignore was ignoring one of the diffs so I removed it. This was added when we were curling Node as node-v{version}-darwin-x64 for the macOS build but this no longer happens (we use the Node action to install a specific version now so we just use the system-wide Node). * Use pre-packaged Code
37 lines
1007 B
Bash
Executable File
37 lines
1007 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
main() {
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
source ./ci/lib.sh
|
|
|
|
echo "Building test plugin"
|
|
pushd test/unit/node/test-plugin
|
|
make -s out/index.js
|
|
popd
|
|
|
|
# Our code imports from `out` in order to work during development but if you
|
|
# have only built for production you will have not have this directory. In
|
|
# that case symlink `out` to a production build directory.
|
|
if [[ ! -e lib/vscode/out ]]; then
|
|
pushd lib
|
|
local out=(vscode-reh-web-*)
|
|
if [[ -d "${out[0]}" ]]; then
|
|
ln -s "../${out[0]}/out" ./vscode/out
|
|
else
|
|
echo "Could not find lib/vscode/out or lib/vscode-reh-web-*"
|
|
echo "Code must be built before running unit tests"
|
|
exit 1
|
|
fi
|
|
popd
|
|
fi
|
|
|
|
# We must keep jest in a sub-directory. See ../../test/package.json for more
|
|
# information. We must also run it from the root otherwise coverage will not
|
|
# include our source files.
|
|
CS_DISABLE_PLUGINS=true ./test/node_modules/.bin/jest "$@"
|
|
}
|
|
|
|
main "$@"
|