You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/12/26 14:13:08 UTC
[lucenenet] 01/04: lucene-cli: Upgraded from netcoreapp3.1 to net6.0
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 6e36a9dd5bffc404e51e9e3decbd903ee3aab091
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Wed Dec 22 16:38:24 2021 +0700
lucene-cli: Upgraded from netcoreapp3.1 to net6.0
---
.github/workflows/Generate-TestWorkflows.ps1 | 4 ++--
.github/workflows/Lucene-Net-Tests-Cli.yml | 2 +-
build/azure-templates/publish-test-results-for-test-projects.yml | 6 +++---
build/build.ps1 | 6 +++---
src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj | 4 ++--
src/dotnet/tools/lucene-cli/lucene-cli.csproj | 4 ++--
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/Generate-TestWorkflows.ps1 b/.github/workflows/Generate-TestWorkflows.ps1
index 91315cb..164aae2 100644
--- a/.github/workflows/Generate-TestWorkflows.ps1
+++ b/.github/workflows/Generate-TestWorkflows.ps1
@@ -329,9 +329,9 @@ foreach ($testProject in $TestProjects) {
$frameworks = @('net5.0')
}
- # Special case - our CLI tool only supports .NET Core 3.1
+ # Special case - our CLI tool only supports .NET 6.0
if ($projectName.Contains("Tests.Cli")) {
- $frameworks = @('netcoreapp3.1')
+ $frameworks = @('net6.0')
}
# Special case - OpenNLP.NET only supports .NET Framework
diff --git a/.github/workflows/Lucene-Net-Tests-Cli.yml b/.github/workflows/Lucene-Net-Tests-Cli.yml
index 8f9c7a8..454b25b 100644
--- a/.github/workflows/Lucene-Net-Tests-Cli.yml
+++ b/.github/workflows/Lucene-Net-Tests-Cli.yml
@@ -70,7 +70,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
- framework: [netcoreapp3.1]
+ framework: [net6.0]
platform: [x64]
configuration: [Release]
exclude:
diff --git a/build/azure-templates/publish-test-results-for-test-projects.yml b/build/azure-templates/publish-test-results-for-test-projects.yml
index d31e0c6..98a19aa 100644
--- a/build/azure-templates/publish-test-results-for-test-projects.yml
+++ b/build/azure-templates/publish-test-results-for-test-projects.yml
@@ -81,18 +81,18 @@ steps:
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
-# Special case: Only supports .netcoreapp3.1
+# Special case: Only supports net6.0
- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.Cli'
- framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
+ framework: 'net6.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
osName: '${{ parameters.osName }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'
-# Special case: Only supports .net48
+# Special case: Only supports net48
- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP'
diff --git a/build/build.ps1 b/build/build.ps1
index 3d2f16e..f4609c7 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -286,8 +286,8 @@ task Test -depends InstallSDK, UpdateLocalSDKVersion, Restore -description "This
foreach ($framework in $frameworksToTest) {
$testName = $testProject.Directory.Name
- # Special case - our CLI tool only supports .NET Core 3.1
- if ($testName.Contains("Tests.Cli") -and (!$framework.StartsWith("netcoreapp3.1"))) {
+ # Special case - our CLI tool only supports .NET 6.0
+ if ($testName.Contains("Tests.Cli") -and (!$framework.StartsWith("net6."))) {
$totalProjects--
$remainingProjects--
continue
@@ -429,7 +429,7 @@ function Get-FrameworksToTest() {
foreach ($framework in $frameworks) {
if ($IsWindows) {
$frameworksToTest.Add($framework)
- } elseif ($framework.StartsWith('netcore')) {
+ } elseif ($framework.StartsWith('netcore') -or $framework.StartsWith('net5.') -or $framework.StartsWith('net6.')) {
$frameworksToTest.Add($framework)
}
}
diff --git a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj
index 5f9279e..22b744a 100644
--- a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj
+++ b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj
@@ -22,11 +22,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
<AssemblyTitle>Lucene.Net.Tests.Cli</AssemblyTitle>
<IsPublishable>false</IsPublishable>
- <IsPublishable Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">true</IsPublishable>
+ <IsPublishable Condition=" '$(TargetFramework)' == 'net6.0' ">true</IsPublishable>
</PropertyGroup>
<Import Project="$(SolutionDir)build\Dependencies.props" />
diff --git a/src/dotnet/tools/lucene-cli/lucene-cli.csproj b/src/dotnet/tools/lucene-cli/lucene-cli.csproj
index 592bd11..6dfabd5 100644
--- a/src/dotnet/tools/lucene-cli/lucene-cli.csproj
+++ b/src/dotnet/tools/lucene-cli/lucene-cli.csproj
@@ -24,9 +24,9 @@
<Import Project="$(SolutionDir)build/NuGet.props" />
<PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFramework>net6.0</TargetFramework>
- <IsPublishable Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">true</IsPublishable>
+ <IsPublishable Condition=" '$(TargetFramework)' == 'net6.0' ">true</IsPublishable>
<PackAsTool>true</PackAsTool>
<ToolCommandName>lucene</ToolCommandName>