diff --git a/distribution-packages/test-standard-packages b/distribution-packages/test-standard-packages index 1cb20fd..aec20db 100755 --- a/distribution-packages/test-standard-packages +++ b/distribution-packages/test-standard-packages @@ -325,11 +325,8 @@ def main() -> int: def to_package_version(version: str) -> str: if '-preview.' or '-rc.' in version: - # Convert upstream version 11.2.3-preview.999.1234 to RPM-style 11.2.3~preview.999 - parts = version.split('-') - if len(parts) == 2: - release_prefix = '.'.join(parts[1].split('.')[0:2]) - return parts[0] + '~' + release_prefix + # Convert upstream version 11.2.3-preview.999.1234 to RPM-style 11.2.3~preview.999.1234 + return version.replace('-', '~') return version diff --git a/distribution-packages/test.sh b/distribution-packages/test.sh index a0e8f57..1a1fd1a 100755 --- a/distribution-packages/test.sh +++ b/distribution-packages/test.sh @@ -5,7 +5,7 @@ IFS=$'\n\t' set -x sdk_version="$(dotnet --version)" -runtime_version="$(dotnet --list-runtimes | head -1 | awk '{ print $2 }')" +runtime_version="$(dotnet --list-runtimes | grep Microsoft.NETCore.App | awk '{ print $2 }')" runtime_id=$(../runtime-id) # This might be the final/only netstandard version from now on netstandard_version=2.1 diff --git a/template-test/test.sh b/template-test/test.sh index c073ced..de6dd25 100755 --- a/template-test/test.sh +++ b/template-test/test.sh @@ -11,6 +11,49 @@ set -x # If additional templates are found via `dotnet new --list`, this test # will fail unless they are added here. +dotnet9Templates=( + apicontroller + blazor + blazorwasm + buildprops + buildtargets + classlib + console + editorconfig + .editorconfig + gitignore + .gitignore + global.json + globaljson + grpc + mstest + mvc + mvccontroller + nuget.config + nugetconfig + nunit + nunit-test + packagesprops + page + proto + razor + razorclasslib + razorcomponent + sln + solution + tool-manifest + view + viewimports + viewstart + web + webapi + webapiaot + webapp + webconfig + worker + xunit +) + dotnet8Templates=( apicontroller blazor @@ -258,15 +301,10 @@ done IFS='.-' read -ra VERSION_SPLIT <<< "$1" declare -a allTemplates -if [[ ${VERSION_SPLIT[0]} == "8" ]]; then - allTemplates=( "${dotnet8Templates[@]}" ) -elif [[ ${VERSION_SPLIT[0]} == "7" ]]; then - allTemplates=( "${dotnet7Templates[@]}" ) -elif [[ ${VERSION_SPLIT[0]} == "6" ]]; then - allTemplates=( "${dotnet6Templates[@]}" ) -elif [[ ${VERSION_SPLIT[0]} == "3" ]]; then - allTemplates=( "${dotnet3Templates[@]}" ) -else +major_version="${VERSION_SPLIT[0]}" +template_names="dotnet${major_version}Templates[@]" +allTemplates=( "${!template_names}" ) +if [[ -z "$allTemplates" ]] ; then echo "error: unknown dotnet version " "${VERSION_SPLIT[@]}" echo "Need a new template list for this. Here's a starting point:" echo "${filteredAutoTemplates[@]}" diff --git a/tools-in-path/test.sh b/tools-in-path/test.sh index b8586e5..d26696d 100755 --- a/tools-in-path/test.sh +++ b/tools-in-path/test.sh @@ -20,6 +20,6 @@ else fi framework_dir=$(../dotnet-directory --framework "$1") -dotnet tool update -g dotnet-ef --version "${framework_dir#*App/}.*-*" +dotnet tool update -g dotnet-ef --version "${framework_dir#*App/}.*" dotnet ef --version