File tree 6 files changed +38
-3
lines changed
6 files changed +38
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ VS Code in the browser
15
15
16
16
| Options Id | Description | Type | Default Value |
17
17
| -----| -----| -----| -----|
18
+ | version | - | string | - |
18
19
| host | - | string | 127.0.0.1 |
19
20
| port | - | string | 8080 |
20
21
| args | - | string | - |
Original file line number Diff line number Diff line change 4
4
"version" : " 1.0.0" ,
5
5
"description" : " VS Code in the browser" ,
6
6
"options" : {
7
+ "version" : {
8
+ "type" : " string" ,
9
+ "default" : " "
10
+ },
7
11
"host" : {
8
12
"type" : " string" ,
9
13
"default" : " 127.0.0.1"
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
3
4
- curl -fsSL https://code-server.dev/install.sh | sh
4
+ CODE_SERVER_INSTALL_ARGS=" "
5
+
6
+ if [ -n " $VERSION " ]; then
7
+ CODE_SERVER_INSTALL_ARGS=" $CODE_SERVER_INSTALL_ARGS --version=\" $VERSION \" "
8
+ fi
9
+
10
+ curl -fsSL https://code-server.dev/install.sh | sh -s -- $CODE_SERVER_INSTALL_ARGS
5
11
6
12
IFS=' ,' read -ra extensions <<< " $EXTENSIONS"
7
13
declare -p extensions
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ check "code-server listening" sudo lsof -i "@0.0.0.0:8080"
11
11
12
12
extensions=$( sudo code-server --list-extensions)
13
13
14
- check " code-server extensions [rust-lang.rust-analyzer]" grep ' rust-lang.rust-analyzer' <<< " $extensions"
15
- check " code-server extensions [ms-python.python]" grep ' ms-python.python' <<< " $extensions"
14
+ check " code-server extensions [rust-lang.rust-analyzer]" grep ' rust-lang.rust-analyzer\> ' <<< " $extensions"
15
+ check " code-server extensions [ms-python.python]" grep ' ms-python.python\> ' <<< " $extensions"
16
16
17
17
# Report results
18
18
reportResults
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ # Optional: Import test library bundled with the devcontainer CLI
5
+ source dev-container-features-test-lib
6
+
7
+ # Feature-specific tests
8
+ check " code-server version" code-server --version
9
+ check " code-server running" pgrep -f ' code-server/lib/node.*/code-server'
10
+ check " code-server listening" sudo lsof -i " @0.0.0.0:8080"
11
+
12
+ version=$( code-server --version)
13
+ check " code-server is correct version" grep ' 4.98.0\>' <<< " $version"
14
+
15
+ # Report results
16
+ reportResults
Original file line number Diff line number Diff line change 22
22
"extensions" : [" rust-lang.rust-analyzer" , " ms-python.python" ]
23
23
}
24
24
}
25
+ },
26
+ "code-server-install-version" : {
27
+ "image" : " mcr.microsoft.com/devcontainers/base:ubuntu" ,
28
+ "features" : {
29
+ "code-server" : {
30
+ "version" : " 4.98.0"
31
+ }
32
+ }
25
33
}
26
34
}
You can’t perform that action at this time.
0 commit comments