Removed V1 support

This commit is contained in:
Koen Bekkenutte
2021-12-12 20:12:50 +08:00
parent 401b7d8043
commit 34a6a4b592
5 changed files with 6 additions and 49 deletions
+5 -12
View File
@@ -23,22 +23,19 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macOS-latest] os: [ubuntu-latest, windows-latest, macOS-latest]
dotnet-version: [6.0.x]
projectables-version: [1, 2]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: ${{ matrix.dotnet-version }} dotnet-version: 6.0.x
include-prerelease: True
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore /p:EFProjectablesVersion=${{ matrix.projectables-version }} run: dotnet restore
- name: Build - name: Build
run: dotnet build --no-restore /p:EFProjectablesVersion=${{ matrix.projectables-version }} run: dotnet build --no-restore
- name: Test - name: Test
run: dotnet test --no-build --verbosity normal /p:EFProjectablesVersion=${{ matrix.projectables-version }} run: dotnet test --no-build --verbosity normal
prerelease: prerelease:
needs: build needs: build
@@ -50,11 +47,7 @@ jobs:
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 6.0.x dotnet-version: 6.0.x
include-prerelease: True - name: Pack
- name: Pack v1
run: |
dotnet pack -v normal -c DebugV1 --include-symbols --include-source -p:PackageVersion=1.0.0-pre-$GITHUB_RUN_ID -o nupkg
- name: Pack v2
run: | run: |
dotnet pack -v normal -c Debug --include-symbols --include-source -p:PackageVersion=2.0.0-pre-$GITHUB_RUN_ID -o nupkg dotnet pack -v normal -c Debug --include-symbols --include-source -p:PackageVersion=2.0.0-pre-$GITHUB_RUN_ID -o nupkg
- name: Push to GitHub Feed - name: Push to GitHub Feed
+1 -18
View File
@@ -20,28 +20,11 @@
<Description>Project over properties and functions in your linq queries</Description> <Description>Project over properties and functions in your linq queries</Description>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'DebugV1' Or '$(Configuration)' == 'ReleaseV1' ">
<EFProjectablesVersion>1</EFProjectablesVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(EFProjectablesVersion)' == '' ">
<EFProjectablesVersion>2</EFProjectablesVersion>
</PropertyGroup>
<PropertyGroup> <PropertyGroup>
<MicrosoftCodeAnalysisVersion>3.11.0</MicrosoftCodeAnalysisVersion> <MicrosoftCodeAnalysisVersion>3.11.0</MicrosoftCodeAnalysisVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" $(EFProjectablesVersion) == 1 "> <PropertyGroup>
<DefineConstants>EFPROJECTABLES1</DefineConstants>
<TargetFrameworkVersion>netstandard2.0</TargetFrameworkVersion>
<MicrosoftExtensionsVersion>3.1.0</MicrosoftExtensionsVersion>
<EFCoreVersion>3.1.0</EFCoreVersion>
<!-- We're testing against EF Core 5 as its compatible with 3.1.0 and contains additional features -->
<TestEFCoreVersion>5.0.10</TestEFCoreVersion>
</PropertyGroup>
<PropertyGroup Condition=" $(EFProjectablesVersion) == 2 ">
<DefineConstants>EFPROJECTABLES2</DefineConstants> <DefineConstants>EFPROJECTABLES2</DefineConstants>
<TargetFrameworkVersion>net6.0</TargetFrameworkVersion> <TargetFrameworkVersion>net6.0</TargetFrameworkVersion>
<MicrosoftExtensionsVersion>6.0.0</MicrosoftExtensionsVersion> <MicrosoftExtensionsVersion>6.0.0</MicrosoftExtensionsVersion>
@@ -120,20 +120,6 @@ namespace EntityFrameworkCore.Projectables.Infrastructure.Internal
debugInfo["Projectables:CompatibilityMode"] = Extension._compatibilityMode.ToString(); debugInfo["Projectables:CompatibilityMode"] = Extension._compatibilityMode.ToString();
} }
#if EFPROJECTABLES1
public override long GetServiceProviderHashCode()
{
var hashCode = nameof(ProjectionOptionsExtension).GetHashCode();
var extension = (ProjectionOptionsExtension)Extension;
hashCode ^= extension._compatibilityMode.GetHashCode();
return hashCode;
}
#endif
#if EFPROJECTABLES2
public override int GetServiceProviderHashCode() public override int GetServiceProviderHashCode()
{ {
var hashCode = new HashCode(); var hashCode = new HashCode();
@@ -146,7 +132,6 @@ namespace EntityFrameworkCore.Projectables.Infrastructure.Internal
public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other) public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)
=> other is ExtensionInfo otherInfo && Extension._compatibilityMode == otherInfo.Extension._compatibilityMode; => other is ExtensionInfo otherInfo && Extension._compatibilityMode == otherInfo.Extension._compatibilityMode;
#endif
} }
} }
} }
@@ -34,7 +34,6 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals
return Verifier.Verify(query.ToQueryString()); return Verifier.Verify(query.ToQueryString());
} }
#if EFPROJECTABLES2
[Fact] [Fact]
public Task RelationalExpression() public Task RelationalExpression()
{ {
@@ -45,6 +44,5 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals
return Verifier.Verify(query.ToQueryString()); return Verifier.Verify(query.ToQueryString());
} }
#endif
} }
} }
@@ -34,7 +34,6 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals
return Verifier.Verify(query.ToQueryString()); return Verifier.Verify(query.ToQueryString());
} }
#if EFPROJECTABLES2
[Fact] [Fact]
public Task RelationalExpression() public Task RelationalExpression()
{ {
@@ -45,6 +44,5 @@ namespace EntityFrameworkCore.Projectables.FunctionalTests.NullConditionals
return Verifier.Verify(query.ToQueryString()); return Verifier.Verify(query.ToQueryString());
} }
#endif
} }
} }