Skip to content

Commit

Permalink
Initial changes for .NET 9 RPMs
Browse files Browse the repository at this point in the history
I built .NET 9 Preview 1 locally and ran tests against it. Here are some
obvious fixes.
  • Loading branch information
omajid committed Mar 12, 2024
1 parent 866675a commit bb9a42a
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 16 deletions.
7 changes: 2 additions & 5 deletions distribution-packages/test-standard-packages
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion distribution-packages/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
56 changes: 47 additions & 9 deletions template-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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[@]}"
Expand Down
2 changes: 1 addition & 1 deletion tools-in-path/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bb9a42a

Please sign in to comment.