diff --git a/.github/workflows/cli-tool.yml b/.github/workflows/cli-tool.yml index 783c60273..8f497ee2c 100644 --- a/.github/workflows/cli-tool.yml +++ b/.github/workflows/cli-tool.yml @@ -20,29 +20,14 @@ jobs: - uses: actions/checkout@v4 - name: Package CLI 6 - run: dotnet pack src\GUI\efcpt.6\efcpt.6.csproj -p:PackageVersion=6.1.${{ env.VERSION }} -p:InformationalVersion=6.1.${{ env.VERSION }} + run: dotnet pack src\GUI\efcpt.6\efcpt.6.csproj -p:PackageVersion=6.1.${{ env.VERSION }}-nightly -p:InformationalVersion=6.1.${{ env.VERSION }}-nightly - name: Package CLI 7 - run: dotnet pack src\GUI\efcpt.7\efcpt.7.csproj -p:PackageVersion=7.1.${{ env.VERSION }} -p:InformationalVersion=7.1.${{ env.VERSION }} + run: dotnet pack src\GUI\efcpt.7\efcpt.7.csproj -p:PackageVersion=7.1.${{ env.VERSION }}-nightly -p:InformationalVersion=7.1.${{ env.VERSION }}-nightly - name: Package CLI 8 - run: dotnet pack src\GUI\efcpt.8\efcpt.8.csproj -p:PackageVersion=8.1.${{ env.VERSION }} -p:InformationalVersion=8.1.${{ env.VERSION }} - - - name: Package Dacpac 6 - run: dotnet pack src\GUI\ErikEJ.EntityFrameworkCore.SqlServer.Dacpac\ErikEJ.EntityFrameworkCore.6.SqlServer.Dacpac.csproj - - - name: Package Dacpac 7 - run: dotnet pack src\GUI\ErikEJ.EntityFrameworkCore.7.SqlServer.Dacpac\ErikEJ.EntityFrameworkCore.7.SqlServer.Dacpac.csproj - - - name: Package Dacpac 8 - run: dotnet pack src\GUI\ErikEJ.EntityFrameworkCore.8.SqlServer.Dacpac\ErikEJ.EntityFrameworkCore.8.SqlServer.Dacpac.csproj - - - name: Package SqlQuery 6 - run: dotnet pack src\GUI\ErikEJ.EntityFrameworkCore.6.SqlServer.SqlQuery\ErikEJ.EntityFrameworkCore.6.SqlServer.SqlQuery.csproj - - - name: Package SqlQuery 7 - run: dotnet pack src\GUI\ErikEJ.EntityFrameworkCore.7.SqlServer.SqlQuery\ErikEJ.EntityFrameworkCore.7.SqlServer.SqlQuery.csproj - + run: dotnet pack src\GUI\efcpt.8\efcpt.8.csproj -p:PackageVersion=8.1.${{ env.VERSION }}-nightly -p:InformationalVersion=8.1.${{ env.VERSION }}-nightly + - name: Core test project run: dotnet test src\GUI\NUnitTestCore\NUnitTestCore.csproj continue-on-error: false @@ -54,11 +39,7 @@ jobs: path: | **/*.nupkg - - name: Set NuGet source - if: startsWith(github.ref, 'refs/heads/master') - run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ErikEJ/index.json" - - name: Publish NuGet if: startsWith(github.ref, 'refs/heads/master') - run: dotnet nuget push **\*.nupkg --source https://ci.appveyor.com/nuget/erikej/api/v2/package --api-key ${{ secrets.APPVEYOR_NUGET_TOKEN }} --skip-duplicate - + run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET }} --skip-duplicate + \ No newline at end of file diff --git a/src/GUI/efcpt.7/Services/PackageService.cs b/src/GUI/efcpt.7/Services/PackageService.cs index 5d9c210b2..a48e34d0c 100644 --- a/src/GUI/efcpt.7/Services/PackageService.cs +++ b/src/GUI/efcpt.7/Services/PackageService.cs @@ -28,20 +28,22 @@ public static async Task CheckForPackageUpdateAsync() using var cache = new SourceCacheContext(); var repository = Repository.Factory.GetCoreV3("https://api.nuget.org/v3/index.json"); - var resource = await repository.GetResourceAsync().ConfigureAwait(false); + var resource = await repository.GetResourceAsync().ConfigureAwait(false); - var versions = await resource.GetAllVersionsAsync( + var packages = await resource.GetMetadataAsync( "ErikEJ.EFCorePowerTools.Cli", + includePrerelease: false, + includeUnlisted: false, cache, logger, cancellationToken).ConfigureAwait(false); - var latestVersion = versions.Where(v => v.Major == Constants.Version).MaxBy(v => v); + var latestVersion = packages.Where(v => v.Identity.Version.Major == Constants.Version).Select(v => v.Identity.Version).MaxBy(v => v); if (latestVersion > CurrentPackageVersion()) { DisplayService.MarkupLine("Your are not using the latest version of the tool, please update to get the latest bug fixes, features and support", Color.Yellow); DisplayService.MarkupLine($"Latest version is '{latestVersion}'", Color.Yellow); - DisplayService.MarkupLine($"Run 'dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version {Constants.Version}.0.*-*' to get the latest version.", Color.Yellow); + DisplayService.MarkupLine($"Run 'dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version {Constants.Version}.0.*' to get the latest version.", Color.Yellow); } } #pragma warning disable CA1031 diff --git a/src/GUI/efcpt.7/readme.md b/src/GUI/efcpt.7/readme.md index 65d3dfeeb..0ea50527f 100644 --- a/src/GUI/efcpt.7/readme.md +++ b/src/GUI/efcpt.7/readme.md @@ -13,19 +13,19 @@ For a quick intro you can watch [this 2 minute demo video](https://www.youtube.c EF Core 8: ```bash -dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 8.0.*-* +dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 8.0.* ``` EF Core 7: ```bash -dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 7.0.*-* +dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 7.0.* ``` EF Core 6: ```bash -dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 6.0.*-* +dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 6.0.* ``` ### Running the tool @@ -112,7 +112,7 @@ The tool can generate a [Mermaid ER diagram](https://mermaid.js.org/syntax/entit ### Updating the tool ```bash -dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.0.*-* +dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.0.* ``` [Release notes](https://github.com/ErikEJ/EFCorePowerTools/wiki/Release-notes) - notice the `+CLI` label. @@ -120,5 +120,5 @@ dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.0.*-* ### Getting the latest daily build ```bash -dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.0.*-* --add-source https://ci.appveyor.com/nuget/efcorepowertools +dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.0.*-* ```