forked from devcontainers/features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_dotnet_multiple_versions.sh
More file actions
45 lines (32 loc) · 1.24 KB
/
Copy pathinstall_dotnet_multiple_versions.sh
File metadata and controls
45 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -e
# Optional: Import test library bundled with the devcontainer CLI
# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
# Provides the 'check' and 'reportResults' commands.
source dev-container-features-test-lib
# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
# check <LABEL> <cmd> [args...]
source dotnet_env.sh
source dotnet_helpers.sh
check ".NET SDK 9.0 installed" \
is_dotnet_sdk_version_installed "9.0"
check ".NET SDK 8.0 installed" \
is_dotnet_sdk_version_installed "8.0"
check ".NET SDK 7.0 installed" \
is_dotnet_sdk_version_installed "7.0"
check ".NET SDK 10.0 installed" \
is_dotnet_sdk_version_installed "10.0"
check "Build example class library" \
dotnet build projects/multitargeting
check "Build and run .NET 9.0 project" \
dotnet run --project projects/net9.0
check "Build and run .NET 8.0 project" \
dotnet run --project projects/net8.0
check "Build and run .NET 7.0 project" \
dotnet run --project projects/net7.0
check "Build and run .NET 10.0 project" \
dotnet run --project projects/net10.0
# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults