mirror of
https://github.com/coder/code-server.git
synced 2026-03-30 00:02:16 +08:00
Instead of building the linux-x64 package, stripping the modules, then installing them again, we build the correct target and use the modules as they are. This means we do not have to copy all the post-processing steps like the ones that delete unnecessary modules. For the NPM package we still publish the linux-x64 package (without modules of course). This means npm installations do not get that same post-processing. Another advantage of this is that we can run the release immediately without having to wait for the build step, or on a commit that no longer has a build artifact, since they all build individually now. We could try sharing the core-ci build step, but leaving that alone for now. I also converted the macOS jobs into a matrix. Deleted the CI readme because it was out of date and seemed to just repeat what should be described in the scripts anyway. Removed a section about Homebrew since we do not maintain that anymore. It looks like there is no need to symlink node_modules.asar anymore.
40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
help() {
|
|
echo >&2 " You can build the release with 'KEEP_MODULES=1 npm run release'"
|
|
echo >&2 " Or you can pass in a custom path."
|
|
echo >&2 " CODE_SERVER_PATH='/var/tmp/coder/code-server/bin/code-server' npm run test:integration"
|
|
}
|
|
|
|
# Make sure a code-server release works. You can pass in the path otherwise it
|
|
# will look for $RELEASE_PATH in the current directory.
|
|
#
|
|
# This is to make sure we don't have Node version errors or any other
|
|
# compilation-related errors.
|
|
main() {
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
source ./ci/lib.sh
|
|
|
|
local path="$RELEASE_PATH/bin/code-server"
|
|
if [[ ! ${CODE_SERVER_PATH-} ]]; then
|
|
echo "Set CODE_SERVER_PATH to test another build of code-server"
|
|
else
|
|
path="$CODE_SERVER_PATH"
|
|
fi
|
|
|
|
echo "Running tests with code-server binary: '$path'"
|
|
|
|
if [[ ! -f $path ]]; then
|
|
echo >&2 "No code-server build detected"
|
|
echo >&2 "Looked in $path"
|
|
help
|
|
exit 1
|
|
fi
|
|
|
|
CODE_SERVER_PATH="$path" ./test/node_modules/.bin/jest "$@" --coverage=false --testRegex "./test/integration/help.test.ts"
|
|
}
|
|
|
|
main "$@"
|