File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 3
3
"scripts" : {
4
4
"runner" : " cd ./scripts && node --max-old-space-size=32384 -r ts-node/register ./build.ts" ,
5
5
"start" : " nodemon --watch ../../../out --verbose ../../../out/vs/server/main.js" ,
6
+ "test" : " ./scripts/test.sh" ,
6
7
"watch" : " cd ../../../ && yarn watch" ,
7
8
"build" : " yarn && yarn runner build" ,
8
9
"package" : " yarn runner package" ,
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
# ci.bash -- Build code-server in the CI.
3
3
4
4
set -euo pipefail
@@ -9,7 +9,7 @@ function main() {
9
9
# Get the version information. If a specific version wasn't set, generate it
10
10
# from the tag and VS Code version.
11
11
local vscode_version=${VSCODE_VERSION:- 1.41.1}
12
- local code_server_version=${VERSION:- 2.${TRAVIS_TAG:- ${DRONE_TAG:- daily} } -vsc $vscode_version }
12
+ local code_server_version=${VERSION:- 2.${TRAVIS_TAG:- ${DRONE_TAG:- daily} } }
13
13
14
14
# Remove everything that isn't the current VS Code source for caching
15
15
# (otherwise the cache will contain old versions).
@@ -32,9 +32,7 @@ function main() {
32
32
}
33
33
34
34
run-yarn build
35
- if [[ -n ${PACKAGE:- } || -n ${BINARY:- } ]] ; then
36
- run-yarn binary
37
- fi
35
+ run-yarn binary
38
36
if [[ -n ${PACKAGE:- } ]] ; then
39
37
run-yarn package
40
38
fi
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+ # test.sh -- Simple test for CI.
3
+ # We'll have more involved tests eventually. This just ensures the binary has
4
+ # been built and runs.
5
+
6
+ set -eu
7
+
8
+ main () {
9
+ cd " $( dirname " $0 " ) /.."
10
+
11
+ version=$( ./binaries/code-server* --version | head -1)
12
+ echo " Got '$version ' for the version"
13
+ case $version in
14
+ * 2.* -vsc1.41.1) exit 0 ;;
15
+ * ) exit 1 ;;
16
+ esac
17
+ }
18
+
19
+ main " $@ "
You can’t perform that action at this time.
0 commit comments