├── src
├── Build
│ ├── docs
│ │ └── release-notes.txt
│ ├── icon.png
│ └── nuget.props
├── UpdatR
│ ├── docs
│ │ ├── README.md
│ │ ├── release-notes.txt
│ │ └── README.source.md
│ ├── images
│ │ └── icon.png
│ ├── Properties
│ │ └── launchSettings.json
│ ├── UpdatR.csproj
│ ├── Domain
│ │ ├── Utils
│ │ │ └── RetriveTargetFramework.cs
│ │ ├── NuGetPackage.cs
│ │ └── RootDir.cs
│ ├── Summary.cs
│ ├── Internals
│ │ └── Result.cs
│ └── Formatters
│ │ └── TextFormatter.cs
├── dotnet-updatr
│ ├── docs
│ │ ├── README.md
│ │ ├── release-notes.txt
│ │ └── README.source.md
│ ├── images
│ │ └── icon.png
│ ├── Properties
│ │ └── launchSettings.json
│ ├── dotnet-updatr.csproj
│ └── Program.cs
└── BuildingBlocks
│ ├── Paths.cs
│ ├── BuildingBlocks.projitems
│ ├── BuildingBlocks.shproj
│ └── NuGetLogger.cs
├── mdsource
├── footer.include.md
├── README.source.md
├── header.include.md
├── sdk-readme.include.md
├── cli-usage.txt
└── cli-readme.include.md
├── tests
├── UpdatR.IntegrationTests
│ ├── UpdaterTests.Given_PackageAndExcludedPackage_When_Update_Then_ExcludeWins.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Dummy.-.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Dummy.--has.-.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Microsoft.-.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Dummy.--Microsoft.-.verified.txt
│ ├── Resources
│ │ ├── Packages
│ │ │ ├── Dummy.0.0.1.nupkg
│ │ │ ├── Dummy.0.0.2.nupkg
│ │ │ ├── Dummy.Tool.0.0.1.nupkg
│ │ │ ├── Dummy.Tool.0.0.2.nupkg
│ │ │ ├── dotnet-ef.5.0.12.nupkg
│ │ │ ├── dotnet-ef.5.0.16.nupkg
│ │ │ ├── dotnet-ef.5.0.17.nupkg
│ │ │ ├── dotnet-ef.5.0.5.nupkg
│ │ │ ├── Has.Previews.0.0.1.nupkg
│ │ │ ├── Has.Previews.0.0.2.nupkg
│ │ │ ├── Has.Newer.Tfm.3.1.0.nupkg
│ │ │ ├── Has.Newer.Tfm.5.0.0.nupkg
│ │ │ ├── Has.Newer.Tfm.6.0.0.nupkg
│ │ │ ├── Has.Previews.0.0.1-preview.nupkg
│ │ │ ├── Has.Previews.0.0.3-preview.0.nupkg
│ │ │ ├── Has.Previews.0.0.3-preview.1.nupkg
│ │ │ ├── Microsoft.EntityFrameworkCore.5.0.12.nupkg
│ │ │ └── Microsoft.EntityFrameworkCore.5.0.16.nupkg
│ │ └── Templates
│ │ │ ├── nuget.config
│ │ │ ├── .config
│ │ │ ├── dotnet-tools.json
│ │ │ └── dotnet-tools2.json
│ │ │ ├── Dummy.App.csproj
│ │ │ └── Dummy.sln
│ ├── Paths.cs
│ ├── UpdaterTests.Given_UpToDate_When_UpdateDotnetConfig_Then_DoNothing_version=0.0.2.verified.txt
│ ├── UpdaterTests.Given_DirectoryAsTarget_When_SingleDotnetConfig_Then_Update.verified.txt
│ ├── UpdaterTests.Given_UpToDate_When_UpdateDotnetConfig_Then_DoNothing_version=0.0.1.verified.txt
│ ├── UpdaterTests.Given_UpToDate_When_Update_Then_DoNothing_version=0.0.2.verified.txt
│ ├── UpdaterTests.Given_TFM_When_UnsupportedInNewerVersions_Then_DoNothing_tfm=net5.0.verified.txt
│ ├── Initialization.cs
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Microsoft.-.verified.txt
│ ├── UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Dummy.--has.-.verified.txt
│ ├── UpdaterTests.Given_PackageAndExcludedPackage_When_Update_Then_ExcludeWins_packages=Dummy.- Dummy.Tool.verified.txt
│ ├── UpdaterTests.Given_DirectoryAsTarget_When_SingleCsproj_Then_Update.verified.txt
│ ├── UpdaterTests.Given_UpToDate_When_Update_Then_DoNothing_version=0.0.1.verified.txt
│ ├── UpdaterTests.Given_TFM_When_UnsupportedInNewerVersions_Then_DoNothing_tfm=net6.0.verified.txt
│ ├── UpdaterTests.Given_TFM_When_UnsupportedInNewerVersions_Then_DoNothing_tfm=net7.0.verified.txt
│ ├── UpdaterTests.Given_LatestPackageHasUnsupportedTfm_When_Update_Then_PickLatestSupportedTfm.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Dummy.-.verified.txt
│ ├── UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Dummy.-.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Dummy.--Microsoft.-.verified.txt
│ ├── UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Dummy.--Microsoft.-.verified.txt
│ ├── UpdaterTests.Given_PackageAndExcludedPackage_When_Update_Then_ExcludeWins_packages=Dummy.- Microsoft.-.verified.txt
│ ├── UpdatR.IntegrationTests.csproj
│ ├── UpdaterTests.Given_UnknownPackageId_When_Updating_Then_DoNothing_hasNugetConfig=False.verified.txt
│ ├── UpdaterTests.Given_UnknownPackageId_When_Updating_Then_DoNothing_hasNugetConfig=True.verified.txt
│ ├── UpdaterTests.Given_PackageWithPrerelease_When_Update_Then_StopAtStableIfPossible_version=0.0.1.verified.txt
│ ├── UpdaterTests.Given_PackageWithPrerelease_When_Update_Then_StopAtStableIfPossible_version=0.0.1-preview.verified.txt
│ ├── UpdaterTests.Given_PackageWithPrerelease_When_Update_Then_StopAtStableIfPossible_version=0.0.3-preview.0.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=.verified.txt
│ ├── UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=.verified.txt
│ ├── UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Microsoft.-.verified.txt
│ ├── UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Dummy.--has.-.verified.txt
│ ├── UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src-.config.verified.txt
│ ├── UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src-.config-dotnet-tools.json.verified.txt
│ ├── UpdaterTests.Given_OutdatedDotnetEf_When_CsprojHasNewer_Then_UpdateToCsprojVersion_path=.config.verified.txt
│ ├── UpdaterTests.Given_OutdatedDotnetEf_When_CsprojHasNewer_Then_UpdateToCsprojVersion_path=.config-dotnet-tools.json.verified.txt
│ ├── UpdaterTests.Given_Target_When_DryRun_Then_DoNothing.verified.txt
│ ├── UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src.verified.txt
│ ├── UpdaterTests.Given_Target_When_Valid_Then_Update_paths=.verified.txt
│ ├── UpdaterTests.Given_Target_When_Valid_Then_Update_paths=Dummy.sln.verified.txt
│ ├── UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src-Dummy.App.csproj.verified.txt
│ ├── UpdaterTests.Given_OutdatedDotnetEf_When_CsprojHasNewer_Then_UpdateToCsprojVersion_path=..verified.txt
│ ├── UpdaterTests.Given_OutdatedDotnetEf_When_UpdatingCsprojToNewer_Then_UpdateToCsprojVersion_path=..verified.txt
│ ├── UpdaterTests.Given_MultiplePackagesInDotnetTools_When_OneOutdated_Then_UpdateThatOne_path=.config.verified.txt
│ ├── UpdaterTests.Given_OutdatedDotnetEf_When_UpdatingCsprojToNewer_Then_UpdateToCsprojVersion_path=Dummy.sln.verified.txt
│ ├── UpdaterTests.Given_MultiplePackagesInDotnetTools_When_OneOutdated_Then_UpdateThatOne_path=.config-dotnet-tools.json.verified.txt
│ ├── UpdaterTests.Given_CsprojNotAddedToSln_When_TargetSln_Then_DoNothing_target=Dummy.sln.verified.txt
│ ├── UpdaterTests.Given_CsprojNotAddedToSln_When_TargetSln_Then_DoNothing_target=.verified.txt
│ └── FileCreationUtils.cs
├── UpdatR.UnitTests
│ ├── Formatters
│ │ ├── MarkdownFormatterTests.EmptyResults_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.NothingToReport_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.EmptyResults_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.KitchenSink_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.NothingToReport_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.TwoUpdatedPackage_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.DeprecatedPackage_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.EmptyResults_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.OneUnknownPackage_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.OneUpdatedPackage_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.UnauthorizedSource_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackage_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.NothingToReport_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.DeprecatedPackageWithoutAlternative_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.OneUpdatedPackageInTwoProjects_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackageWithVulnerabilities_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackageWithVulnerability_method=GenerateTitle.verified.txt
│ │ ├── MarkdownFormatterTests.OneUnknownPackage_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.UnauthorizedSource_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackage_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.OneUnknownPackage_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.UnauthorizedSource_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackage_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackageWithVulnerability_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackageWithVulnerability_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.OneUpdatedPackage_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackageWithVulnerabilities_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.OneUpdatedPackage_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.VulnerablePackageWithVulnerabilities_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.DeprecatedPackageWithoutAlternative_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.OneUpdatedPackageInTwoProjects_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.DeprecatedPackageWithoutAlternative_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.OneUpdatedPackageInTwoProjects_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.DeprecatedPackage_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.DeprecatedPackage_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.TwoUpdatedPackage_method=GenerateDescription.verified.txt
│ │ ├── MarkdownFormatterTests.TwoUpdatedPackage_method=Generate.verified.txt
│ │ ├── MarkdownFormatterTests.KitchenSink_method=GenerateDescription.verified.txt
│ │ └── MarkdownFormatterTests.KitchenSink_method=Generate.verified.txt
│ ├── GlobalSuppressions.cs
│ ├── UpdatR.UnitTests.csproj
│ └── Domain
│ │ └── NuGetPackageTests.cs
├── UpdatR.E2eTests
│ ├── Dummy
│ │ ├── Dummy.App
│ │ │ ├── Program.cs
│ │ │ └── Dummy.App.csproj
│ │ ├── nuget.config
│ │ └── Dummy.sln
│ ├── UpdatR.E2eTests.csproj
│ ├── TestOutputHelperTextWriterAdapter.cs
│ └── LiveTests.cs
└── DummyPackage
│ ├── DummyPackage.csproj
│ └── Build.cs
├── mdsnippets.json
├── tools
└── Build
│ ├── Properties
│ └── launchSettings.json
│ ├── .config
│ └── dotnet-tools.json
│ └── Build.csproj
├── docs
└── UpdatR.SampleApp
│ ├── UpdatR.SampleApp.csproj
│ └── Program.cs
├── .github
├── workflows
│ ├── update-docs.yml
│ ├── push.yml
│ ├── build.yml
│ ├── release.yml
│ ├── post-release.yml
│ └── update.yml
└── FUNDING.yml
├── Directory.Build.props
├── LICENSE
├── .editorconfig
├── README.md
└── .gitignore
/src/Build/docs/release-notes.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/UpdatR/docs/README.md:
--------------------------------------------------------------------------------
1 | PLACEHOLDER
--------------------------------------------------------------------------------
/src/dotnet-updatr/docs/README.md:
--------------------------------------------------------------------------------
1 | PLACEHOLDER
--------------------------------------------------------------------------------
/src/UpdatR/docs/release-notes.txt:
--------------------------------------------------------------------------------
1 | PLACEHOLDER
--------------------------------------------------------------------------------
/src/dotnet-updatr/docs/release-notes.txt:
--------------------------------------------------------------------------------
1 | PLACEHOLDER
--------------------------------------------------------------------------------
/src/UpdatR/docs/README.source.md:
--------------------------------------------------------------------------------
1 | include: sdk-readme
2 |
3 | include: footer
--------------------------------------------------------------------------------
/src/dotnet-updatr/docs/README.source.md:
--------------------------------------------------------------------------------
1 | include: cli-readme
2 |
3 | include: footer
--------------------------------------------------------------------------------
/src/Build/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/src/Build/icon.png
--------------------------------------------------------------------------------
/src/UpdatR/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/src/UpdatR/images/icon.png
--------------------------------------------------------------------------------
/mdsource/footer.include.md:
--------------------------------------------------------------------------------
1 | # Icon
2 | Package by Sergey Novosyolov from [NounProject.com](http://NounProject.com)
3 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_PackageAndExcludedPackage_When_Update_Then_ExcludeWins.verified.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/dotnet-updatr/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/src/dotnet-updatr/images/icon.png
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.EmptyResults_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | emptyString
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.NothingToReport_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | emptyString
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=.verified.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.EmptyResults_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.KitchenSink_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update Updated.Package
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.NothingToReport_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.TwoUpdatedPackage_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update 2 packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.DeprecatedPackage_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.EmptyResults_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUnknownPackage_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUpdatedPackage_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update Updated.Package
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.UnauthorizedSource_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackage_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Dummy.-.verified.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.NothingToReport_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Dummy.--has.-.verified.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_excludedPackages=Dummy.--Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.DeprecatedPackageWithoutAlternative_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUpdatedPackageInTwoProjects_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update Updated.Package
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackageWithVulnerabilities_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackageWithVulnerability_method=GenerateTitle.verified.txt:
--------------------------------------------------------------------------------
1 | 📦 Update no packages
--------------------------------------------------------------------------------
/mdsource/README.source.md:
--------------------------------------------------------------------------------
1 | include: header
2 |
3 | # UpdatR packages
4 |
5 | include: cli-readme
6 |
7 | include: sdk-readme
8 |
9 | include: footer
--------------------------------------------------------------------------------
/tests/UpdatR.E2eTests/Dummy/Dummy.App/Program.cs:
--------------------------------------------------------------------------------
1 | // See https://aka.ms/new-console-template for more information
2 | Console.WriteLine("Hello, World!");
3 |
--------------------------------------------------------------------------------
/mdsource/header.include.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/OskarKlintrot/UpdatR/actions/workflows/build.yml)
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.0.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.0.0.1.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.0.0.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.0.0.2.nupkg
--------------------------------------------------------------------------------
/mdsnippets.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
3 | "Convention": "SourceTransform",
4 | "OmitSnippetLinks": true
5 | }
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.Tool.0.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.Tool.0.0.1.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.Tool.0.0.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Dummy.Tool.0.0.2.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.12.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.12.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.16.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.16.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.17.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.17.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.5.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/dotnet-ef.5.0.5.nupkg
--------------------------------------------------------------------------------
/src/BuildingBlocks/Paths.cs:
--------------------------------------------------------------------------------
1 | namespace BuildingBlocks;
2 |
3 | internal static class Paths
4 | {
5 | public static string Temporary => Path.Combine(Path.GetTempPath(), "dotnet-updatr");
6 | }
7 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.1.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.2.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.2.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Newer.Tfm.3.1.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Newer.Tfm.3.1.0.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Newer.Tfm.5.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Newer.Tfm.5.0.0.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Newer.Tfm.6.0.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Newer.Tfm.6.0.0.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Templates/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.1-preview.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.1-preview.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.3-preview.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.3-preview.0.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.3-preview.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Has.Previews.0.0.3-preview.1.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Microsoft.EntityFrameworkCore.5.0.12.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Microsoft.EntityFrameworkCore.5.0.12.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Packages/Microsoft.EntityFrameworkCore.5.0.16.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OskarKlintrot/UpdatR/HEAD/tests/UpdatR.IntegrationTests/Resources/Packages/Microsoft.EntityFrameworkCore.5.0.16.nupkg
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUnknownPackage_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Not found packages
2 |
3 | ### Unknown.Package
4 |
5 | Used in:
6 | - Foo\Foo.csproj
7 | - Bar\Bar.csproj
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.UnauthorizedSource_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Unauthorized sources
2 |
3 | | Name | Source |
4 | |:-----|:-------|
5 | | Unauthorized source | https://google.com |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackage_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Vulnerable packages
2 |
3 | ### Vulnerable.Package
4 |
5 | #### Used in:
6 | - Foo\Foo.csproj
7 | - Bar\Bar.csproj
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUnknownPackage_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Not found packages
4 |
5 | ### Unknown.Package
6 |
7 | Used in:
8 | - Foo\Foo.csproj
9 | - Bar\Bar.csproj
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.UnauthorizedSource_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Unauthorized sources
4 |
5 | | Name | Source |
6 | |:-----|:-------|
7 | | Unauthorized source | https://google.com |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackage_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Vulnerable packages
4 |
5 | ### Vulnerable.Package
6 |
7 | #### Used in:
8 | - Foo\Foo.csproj
9 | - Bar\Bar.csproj
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Templates/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "": {
6 | "version": "",
7 | "commands": [
8 | ""
9 | ]
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackageWithVulnerability_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Vulnerable packages
2 |
3 | ### Vulnerable.Package
4 | Version 1.2.3 with severity 1: https://google.com/
5 |
6 | #### Used in:
7 | - Foo\Foo.csproj
8 | - Bar\Bar.csproj
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackageWithVulnerability_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Vulnerable packages
4 |
5 | ### Vulnerable.Package
6 | Version 1.2.3 with severity 1: https://google.com/
7 |
8 | #### Used in:
9 | - Foo\Foo.csproj
10 | - Bar\Bar.csproj
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUpdatedPackage_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | 1 package(s) were updated in 1 projects:
2 |
3 | | Updated.Package |
4 |
5 | ## Updated packages
6 |
7 | ### Updated.Package
8 | | Project | From | To |
9 | |:----------|:-------|:---|
10 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tools/Build/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Build": {
4 | "commandName": "Project",
5 | "commandLineArgs": "reset-generated-docs"
6 | },
7 | "Build-WSL2": {
8 | "commandName": "WSL",
9 | "commandLineArgs": "Build.dll update-packages",
10 | "distributionName": "Ubuntu"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackageWithVulnerabilities_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Vulnerable packages
2 |
3 | ### Vulnerable.Package
4 | Version 1.2.3 with severity 1: https://google.com/
5 | Version 1.2.3 with severity 2: https://google.com/foo
6 |
7 | #### Used in:
8 | - Foo\Foo.csproj
9 | - Bar\Bar.csproj
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tools/Build/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "dotnet-updatr": {
6 | "version": "4.0.0",
7 | "commands": [
8 | "update"
9 | ]
10 | },
11 | "markdownsnippets.tool": {
12 | "version": "27.0.2",
13 | "commands": [
14 | "mdsnippets"
15 | ]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Templates/Dummy.App.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUpdatedPackage_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update Updated.Package
2 |
3 | 1 package(s) were updated in 1 projects:
4 |
5 | | Updated.Package |
6 |
7 | ## Updated packages
8 |
9 | ### Updated.Package
10 | | Project | From | To |
11 | |:----------|:-------|:---|
12 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/UpdatR/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "UpdatR.Cli": {
4 | "commandName": "Project"
5 | },
6 | "WSL": {
7 | "commandName": "WSL2",
8 | "environmentVariables": {},
9 | "commandLineArgs": "UpdatR.Cli.dll --path /mnt/c/repos/UpdatR/UpdatR.sln --verbosity Debug",
10 | "distributionName": "Ubuntu"
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.VulnerablePackageWithVulnerabilities_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Vulnerable packages
4 |
5 | ### Vulnerable.Package
6 | Version 1.2.3 with severity 1: https://google.com/
7 | Version 1.2.3 with severity 2: https://google.com/foo
8 |
9 | #### Used in:
10 | - Foo\Foo.csproj
11 | - Bar\Bar.csproj
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.DeprecatedPackageWithoutAlternative_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Deprecated packages
2 |
3 | ### Deprecated.Package
4 | > Old and deprecated package.
5 |
6 | Reason(s): Other
7 |
8 | Package used in:
9 |
10 | | Project | Version |
11 | |:--------|:--------|
12 | | Foo\Foo.csproj | 1.2.3 |
13 | | Bar\Bar.csproj | 1.2.3 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUpdatedPackageInTwoProjects_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | 1 package(s) were updated in 2 projects:
2 |
3 | | Updated.Package |
4 |
5 | ## Updated packages
6 |
7 | ### Updated.Package
8 | | Project | From | To |
9 | |:----------|:-------|:---|
10 | | Bar\Bar.csproj | 1.0.0 | 2.0.0 |
11 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Templates/.config/dotnet-tools2.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "": {
6 | "version": "",
7 | "commands": [
8 | ""
9 | ]
10 | },
11 | "": {
12 | "version": "",
13 | "commands": [
14 | ""
15 | ]
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.DeprecatedPackageWithoutAlternative_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Deprecated packages
4 |
5 | ### Deprecated.Package
6 | > Old and deprecated package.
7 |
8 | Reason(s): Other
9 |
10 | Package used in:
11 |
12 | | Project | Version |
13 | |:--------|:--------|
14 | | Foo\Foo.csproj | 1.2.3 |
15 | | Bar\Bar.csproj | 1.2.3 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/docs/UpdatR.SampleApp/UpdatR.SampleApp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.OneUpdatedPackageInTwoProjects_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update Updated.Package
2 |
3 | 1 package(s) were updated in 2 projects:
4 |
5 | | Updated.Package |
6 |
7 | ## Updated packages
8 |
9 | ### Updated.Package
10 | | Project | From | To |
11 | |:----------|:-------|:---|
12 | | Bar\Bar.csproj | 1.0.0 | 2.0.0 |
13 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.DeprecatedPackage_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | ## Deprecated packages
2 |
3 | ### Deprecated.Package
4 | > Old and deprecated package.
5 |
6 | Reason(s): Other
7 |
8 | Alternate Package: Not.Deprecated
9 |
10 | Version range: (, )
11 |
12 | Package used in:
13 |
14 | | Project | Version |
15 | |:--------|:--------|
16 | | Foo\Foo.csproj | 1.2.3 |
17 | | Bar\Bar.csproj | 1.2.3 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.DeprecatedPackage_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update no packages
2 |
3 | ## Deprecated packages
4 |
5 | ### Deprecated.Package
6 | > Old and deprecated package.
7 |
8 | Reason(s): Other
9 |
10 | Alternate Package: Not.Deprecated
11 |
12 | Version range: (, )
13 |
14 | Package used in:
15 |
16 | | Project | Version |
17 | |:--------|:--------|
18 | | Foo\Foo.csproj | 1.2.3 |
19 | | Bar\Bar.csproj | 1.2.3 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.github/workflows/update-docs.yml:
--------------------------------------------------------------------------------
1 | name: docs
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches:
7 | - main
8 |
9 | jobs:
10 | update-docs:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v4
16 | - name: Setup .NET
17 | uses: actions/setup-dotnet@v4
18 | with:
19 | dotnet-version: 6.x.x
20 | - name: Update README
21 | run: dotnet run -- update-README --parallel
22 | working-directory: tools/Build
23 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Paths.cs:
--------------------------------------------------------------------------------
1 | namespace UpdatR.IntegrationTests;
2 |
3 | internal static class Paths
4 | {
5 | public static string Packages =>
6 | Path.Combine(Directory.GetCurrentDirectory(), "Resources", "Packages");
7 |
8 | public static class Temporary
9 | {
10 | public static string Root =>
11 | Path.Combine(Path.GetTempPath(), "dotnet-updatr", "integrationtests");
12 |
13 | public static string Packages => Path.Combine(Root, "Packages");
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.TwoUpdatedPackage_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | 2 package(s) were updated in 1 projects:
2 |
3 | | Updated.Package | Updated.Package.Abstracts |
4 |
5 | ## Updated packages
6 |
7 | ### Updated.Package
8 | | Project | From | To |
9 | |:----------|:-------|:---|
10 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
11 |
12 | ### Updated.Package.Abstracts
13 | | Project | From | To |
14 | |:----------|:-------|:---|
15 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.TwoUpdatedPackage_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update 2 packages
2 |
3 | 2 package(s) were updated in 1 projects:
4 |
5 | | Updated.Package | Updated.Package.Abstracts |
6 |
7 | ## Updated packages
8 |
9 | ### Updated.Package
10 | | Project | From | To |
11 | |:----------|:-------|:---|
12 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
13 |
14 | ### Updated.Package.Abstracts
15 | | Project | From | To |
16 | |:----------|:-------|:---|
17 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_UpToDate_When_UpdateDotnetConfig_Then_DoNothing_version=0.0.2.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | []
3 |
4 | {
5 | "version": 1,
6 | "isRoot": true,
7 | "tools": {
8 | "Dummy.Tool": {
9 | "version": "0.0.2",
10 | "commands": [
11 | "dummy"
12 | ]
13 | }
14 | }
15 | }
16 |
17 |
18 | {
19 | "version": 1,
20 | "isRoot": true,
21 | "tools": {
22 | "Dummy.Tool": {
23 | "version": "0.0.2",
24 | "commands": [
25 | "dummy"
26 | ]
27 | }
28 | }
29 | }
30 |
31 | ]
--------------------------------------------------------------------------------
/.github/workflows/push.yml:
--------------------------------------------------------------------------------
1 | name: push packages
2 |
3 | on:
4 | push:
5 | tags:
6 | - v**
7 |
8 | jobs:
9 | push-packages:
10 |
11 | runs-on: ubuntu-latest
12 | environment: Push package
13 |
14 | steps:
15 | - uses: actions/checkout@v4
16 | - name: Setup .NET
17 | uses: actions/setup-dotnet@v4
18 | with:
19 | dotnet-version: 6.x.x
20 | - name: Push NuGet Packages
21 | run: dotnet run -- push --parallel
22 | working-directory: tools/Build
23 | env:
24 | API_ACCESS_TOKEN: ${{ secrets.API_ACCESS_TOKEN }}
25 |
--------------------------------------------------------------------------------
/src/dotnet-updatr/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "WSL": {
4 | "commandName": "WSL2",
5 | "commandLineArgs": "UpdatR.Cli.dll --path /mnt/c/repos/UpdatR/UpdatR.sln --verbosity Debug",
6 | "distributionName": "Ubuntu"
7 | },
8 | "UpdatR.Cli --help": {
9 | "commandName": "Project",
10 | "commandLineArgs": "--help"
11 | },
12 | "UpdatR.Cli": {
13 | "commandName": "Project",
14 | "commandLineArgs": "--dry-run",
15 | "workingDirectory": "C:\\_repos\\OskarKlintrot\\UpdatR\\tools\\Build"
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: build
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches:
7 | - main
8 | - update
9 | pull_request:
10 | branches:
11 | - main
12 |
13 | jobs:
14 | run-tests:
15 |
16 | runs-on: ubuntu-latest
17 |
18 | steps:
19 | - uses: actions/checkout@v4
20 | - name: Setup .NET
21 | uses: actions/setup-dotnet@v4
22 | with:
23 | dotnet-version: |
24 | 6.x.x
25 | 8.x.x
26 | - name: Run tests
27 | run: dotnet run -- test --parallel
28 | working-directory: tools/Build
29 |
--------------------------------------------------------------------------------
/tests/UpdatR.E2eTests/Dummy/Dummy.App/Dummy.App.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: create release
2 |
3 | on:
4 | workflow_run:
5 | workflows: ["push packages"]
6 | types:
7 | - completed
8 |
9 | jobs:
10 | create-release:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v4
16 | - name: Setup .NET
17 | uses: actions/setup-dotnet@v4
18 | with:
19 | dotnet-version: 6.x.x
20 | - name: Create GitHub Release
21 | run: dotnet run -- create-release --parallel
22 | working-directory: tools/Build
23 | env:
24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 |
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | latest
6 | enable
7 | enable
8 |
9 |
10 |
11 | latest-Recommended
12 | true
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/.github/workflows/post-release.yml:
--------------------------------------------------------------------------------
1 | name: post release cleanup
2 |
3 | on:
4 | workflow_dispatch:
5 | workflow_run:
6 | workflows: ["push packages"]
7 | types:
8 | - completed
9 |
10 | jobs:
11 | post-release-cleanup:
12 |
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - uses: actions/checkout@v4
17 | - name: Setup .NET
18 | uses: actions/setup-dotnet@v4
19 | with:
20 | dotnet-version: 6.x.x
21 | - name: Clean up after release
22 | run: dotnet run -- post-release --parallel
23 | working-directory: tools/Build
24 | env:
25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 |
--------------------------------------------------------------------------------
/tests/UpdatR.E2eTests/Dummy/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // This file is used by Code Analysis to maintain SuppressMessage
2 | // attributes that are applied to this project.
3 | // Project-level suppressions either have no target or are given
4 | // a specific target and scoped to a namespace, type, member, etc.
5 |
6 | using System.Diagnostics.CodeAnalysis;
7 |
8 | [assembly: SuppressMessage(
9 | "Performance",
10 | "CA1861:Avoid constant arrays as arguments",
11 | Justification = "Not important for unit tests",
12 | Scope = "member",
13 | Target = "~M:UpdatR.UnitTests.ProjectBuilder.WithDeprecatedPackage(System.String,System.String,System.String,System.Boolean)~UpdatR.UnitTests.ProjectBuilder"
14 | )]
15 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_DirectoryAsTarget_When_SingleDotnetConfig_Then_Update.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: dotnet-tools.json
10 | }
11 | ]
12 | }
13 | ]
14 |
15 | {
16 | "version": 1,
17 | "isRoot": true,
18 | "tools": {
19 | "Dummy.Tool": {
20 | "version": "0.0.1",
21 | "commands": [
22 | "dummy"
23 | ]
24 | }
25 | }
26 | }
27 |
28 |
29 | {
30 | "version": 1,
31 | "isRoot": true,
32 | "tools": {
33 | "Dummy.Tool": {
34 | "version": "0.0.2",
35 | "commands": [
36 | "dummy"
37 | ]
38 | }
39 | }
40 | }
41 |
42 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_UpToDate_When_UpdateDotnetConfig_Then_DoNothing_version=0.0.1.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: dotnet-tools.json
10 | }
11 | ]
12 | }
13 | ]
14 |
15 | {
16 | "version": 1,
17 | "isRoot": true,
18 | "tools": {
19 | "Dummy.Tool": {
20 | "version": "0.0.1",
21 | "commands": [
22 | "dummy"
23 | ]
24 | }
25 | }
26 | }
27 |
28 |
29 | {
30 | "version": 1,
31 | "isRoot": true,
32 | "tools": {
33 | "Dummy.Tool": {
34 | "version": "0.0.2",
35 | "commands": [
36 | "dummy"
37 | ]
38 | }
39 | }
40 | }
41 |
42 | ]
--------------------------------------------------------------------------------
/src/BuildingBlocks/BuildingBlocks.projitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | a63910fe-f91f-4aa0-bf42-06b086f7556d
7 |
8 |
9 | BuildingBlocks
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/mdsource/sdk-readme.include.md:
--------------------------------------------------------------------------------
1 | ## UpdatR
2 |
3 | [](https://www.nuget.org/packages/UpdatR/)
4 | [](https://www.nuget.org/packages/UpdatR/)
5 |
6 | NuGet package to programmatically update package reference and dotnet-tools.json.
7 |
8 | The tool will try to stick to package versions that is supported by the projects target framework moniker. If a package supports both .NETStandard and .NET, the compatibility with .NETStandard will be ignored if the project is targeting .NET. This is to avoid false positives where a package technically supports a TFM but in reality never have been tested against the TFM.
9 |
10 | See [dotnet-updatr](#dotnet-updatr) for a dotnet tool that can be run from the command-line.
11 |
12 | ### Usage
13 |
14 | snippet: SampleUsage
15 |
--------------------------------------------------------------------------------
/tools/Build/Build.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | f8057ef4-f389-4c3d-bbc5-ec638d0454d7
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/UpdatR.SampleApp/Program.cs:
--------------------------------------------------------------------------------
1 | // CA1852 Type 'Program' can be sealed because it has no subtypes in its containing assembly and is not externally visible
2 | #pragma warning disable CA1852 // <-- Disabled due to bug: https://github.com/dotnet/roslyn-analyzers/issues/6141
3 |
4 | // begin-snippet: SampleUsage
5 | using UpdatR;
6 | using UpdatR.Formatters;
7 |
8 | var updatr = new Updater(); // Can take an ILogger
9 |
10 | var summary = await updatr.UpdateAsync("path");
11 |
12 | if (summary.UpdatedPackagesCount == 0) // No packages where updated
13 | {
14 | return;
15 | }
16 |
17 | var title = MarkdownFormatter.GenerateTitle(summary);
18 |
19 | var description =
20 | "# PR created automatically by UpdatR"
21 | + Environment.NewLine
22 | + Environment.NewLine
23 | + MarkdownFormatter.GenerateDescription(summary);
24 |
25 | // Use title as title in the PR and description as the description/body in the PR
26 | // end-snippet
27 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_UpToDate_When_Update_Then_DoNothing_version=0.0.2.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | []
3 |
4 |
5 |
6 |
7 | Exe
8 | net6.0
9 | enable
10 | enable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Exe
21 | net6.0
22 | enable
23 | enable
24 |
25 |
26 |
27 |
28 |
29 | ]
--------------------------------------------------------------------------------
/tests/DummyPackage/DummyPackage.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | exe
5 | net6.0
6 | latest
7 | enable
8 | enable
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | <_Parameter1>$(ProjectDir)
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_TFM_When_UnsupportedInNewerVersions_Then_DoNothing_tfm=net5.0.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | []
3 |
4 |
5 |
6 |
7 | Exe
8 | net6.0
9 | enable
10 | enable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Exe
21 | net6.0
22 | enable
23 | enable
24 |
25 |
26 |
27 |
28 |
29 | ]
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [oskarklintrot] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12 | polar: # Replace with a single Polar username
13 | buy_me_a_coffee: oskarklintrot # Replace with a single Buy Me a Coffee username
14 | thanks_dev: # Replace with a single thanks.dev username
15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/UpdatR.UnitTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | runtime; build; native; contentfiles; analyzers; buildtransitive
13 | all
14 |
15 |
16 | runtime; build; native; contentfiles; analyzers; buildtransitive
17 | all
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Initialization.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.CompilerServices;
2 |
3 | namespace UpdatR.IntegrationTests;
4 |
5 | public static class Initialization
6 | {
7 | [ModuleInitializer]
8 | public static void Run()
9 | {
10 | if (Directory.Exists(Paths.Temporary.Root))
11 | {
12 | Directory.Delete(Paths.Temporary.Root, true);
13 | }
14 |
15 | Directory.CreateDirectory(Paths.Temporary.Root);
16 | Directory.CreateDirectory(Paths.Temporary.Packages);
17 |
18 | CopyPackages(Paths.Temporary.Packages);
19 | }
20 |
21 | private static void CopyPackages(string source)
22 | {
23 | if (!Directory.Exists(source))
24 | {
25 | throw new ArgumentException("Path not found.", nameof(source));
26 | }
27 |
28 | foreach (var package in Directory.EnumerateFiles(Paths.Packages, "*.nupkg"))
29 | {
30 | File.Copy(package, Path.Combine(source, new FileInfo(package).Name), overwrite: true);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tests/UpdatR.E2eTests/Dummy/Dummy.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30114.105
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dummy.App", "Dummy.App\Dummy.App.csproj", "{3C97CFC9-CE58-4E2B-8D5E-4591270C362B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(SolutionProperties) = preSolution
14 | HideSolutionNode = FALSE
15 | EndGlobalSection
16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
17 | {3C97CFC9-CE58-4E2B-8D5E-4591270C362B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18 | {3C97CFC9-CE58-4E2B-8D5E-4591270C362B}.Debug|Any CPU.Build.0 = Debug|Any CPU
19 | {3C97CFC9-CE58-4E2B-8D5E-4591270C362B}.Release|Any CPU.ActiveCfg = Release|Any CPU
20 | {3C97CFC9-CE58-4E2B-8D5E-4591270C362B}.Release|Any CPU.Build.0 = Release|Any CPU
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.KitchenSink_method=GenerateDescription.verified.txt:
--------------------------------------------------------------------------------
1 | 1 package(s) were updated in 1 projects:
2 |
3 | | Updated.Package |
4 |
5 | ## Vulnerable packages
6 |
7 | ### Vulnerable.Package
8 | Version 1.2.3 with severity 1: https://google.com/
9 |
10 | #### Used in:
11 | - Foo\Foo.csproj
12 |
13 |
14 | ## Deprecated packages
15 |
16 | ### Deprecated.Package
17 | > Old and deprecated package.
18 |
19 | Reason(s): Other
20 |
21 | Alternate Package: Not.Deprecated
22 |
23 | Version range: (, )
24 |
25 | Package used in:
26 |
27 | | Project | Version |
28 | |:--------|:--------|
29 | | Foo\Foo.csproj | 1.2.3 |
30 |
31 |
32 | ## Updated packages
33 |
34 | ### Updated.Package
35 | | Project | From | To |
36 | |:----------|:-------|:---|
37 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
38 |
39 |
40 | ## Not found packages
41 |
42 | ### Unknown.Package
43 |
44 | Used in:
45 | - Foo\Foo.csproj
46 |
47 |
48 | ## Unauthorized sources
49 |
50 | | Name | Source |
51 | |:-----|:-------|
52 | | Unauthorized source | https://google.com |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/BuildingBlocks/BuildingBlocks.shproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | a63910fe-f91f-4aa0-bf42-06b086f7556d
5 | 14.0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | []
3 |
4 |
5 |
6 |
7 | Exe
8 | net6.0
9 | enable
10 | enable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Exe
22 | net6.0
23 | enable
24 | enable
25 |
26 |
27 |
28 |
29 |
30 |
31 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.UnitTests/Formatters/MarkdownFormatterTests.KitchenSink_method=Generate.verified.txt:
--------------------------------------------------------------------------------
1 | # 📦 Update Updated.Package
2 |
3 | 1 package(s) were updated in 1 projects:
4 |
5 | | Updated.Package |
6 |
7 | ## Vulnerable packages
8 |
9 | ### Vulnerable.Package
10 | Version 1.2.3 with severity 1: https://google.com/
11 |
12 | #### Used in:
13 | - Foo\Foo.csproj
14 |
15 |
16 | ## Deprecated packages
17 |
18 | ### Deprecated.Package
19 | > Old and deprecated package.
20 |
21 | Reason(s): Other
22 |
23 | Alternate Package: Not.Deprecated
24 |
25 | Version range: (, )
26 |
27 | Package used in:
28 |
29 | | Project | Version |
30 | |:--------|:--------|
31 | | Foo\Foo.csproj | 1.2.3 |
32 |
33 |
34 | ## Updated packages
35 |
36 | ### Updated.Package
37 | | Project | From | To |
38 | |:----------|:-------|:---|
39 | | Foo\Foo.csproj | 1.0.0 | 2.0.0 |
40 |
41 |
42 | ## Not found packages
43 |
44 | ### Unknown.Package
45 |
46 | Used in:
47 | - Foo\Foo.csproj
48 |
49 |
50 | ## Unauthorized sources
51 |
52 | | Name | Source |
53 | |:-----|:-------|
54 | | Unauthorized source | https://google.com |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Dummy.--has.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | []
3 |
4 |
5 |
6 |
7 | Exe
8 | net6.0
9 | enable
10 | enable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Exe
22 | net6.0
23 | enable
24 | enable
25 |
26 |
27 |
28 |
29 |
30 |
31 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_PackageAndExcludedPackage_When_Update_Then_ExcludeWins_packages=Dummy.- Dummy.Tool.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | []
3 |
4 |
5 |
6 |
7 | Exe
8 | net6.0
9 | enable
10 | enable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | Exe
22 | net6.0
23 | enable
24 | enable
25 |
26 |
27 |
28 |
29 |
30 |
31 | ]
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Oskar Klintrot
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/tests/UpdatR.E2eTests/UpdatR.E2eTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | runtime; build; native; contentfiles; analyzers; buildtransitive
20 | all
21 |
22 |
23 | runtime; build; native; contentfiles; analyzers; buildtransitive
24 | all
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_DirectoryAsTarget_When_SingleCsproj_Then_Update.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Exe
32 | net6.0
33 | enable
34 | enable
35 |
36 |
37 |
38 |
39 |
40 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_UpToDate_When_Update_Then_DoNothing_version=0.0.1.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Exe
32 | net6.0
33 | enable
34 | enable
35 |
36 |
37 |
38 |
39 |
40 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_TFM_When_UnsupportedInNewerVersions_Then_DoNothing_tfm=net6.0.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Exe
32 | net6.0
33 | enable
34 | enable
35 |
36 |
37 |
38 |
39 |
40 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_TFM_When_UnsupportedInNewerVersions_Then_DoNothing_tfm=net7.0.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Exe
32 | net6.0
33 | enable
34 | enable
35 |
36 |
37 |
38 |
39 |
40 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_LatestPackageHasUnsupportedTfm_When_Update_Then_PickLatestSupportedTfm.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Has.Newer.Tfm,
5 | Updates: [
6 | {
7 | Item1: 3.1.0,
8 | Item2: 5.0.0,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net5.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Exe
32 | net5.0
33 | enable
34 | enable
35 |
36 |
37 |
38 |
39 |
40 | ]
--------------------------------------------------------------------------------
/.github/workflows/update.yml:
--------------------------------------------------------------------------------
1 | name: update packages
2 |
3 | on:
4 | schedule:
5 | # * is a special character in YAML so you have to quote this string
6 | - cron: '0 0 * * MON' # At 00:00, only on Monday
7 | push:
8 | paths:
9 | - 'tools/Build/.config/dotnet-tools.json'
10 |
11 | jobs:
12 | update-packages:
13 |
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v4
18 | if: github.event_name == 'push'
19 | - name: Checkout main
20 | uses: actions/checkout@v4
21 | if: github.event_name == 'schedule'
22 | with:
23 | ref: main
24 | - name: Setup .NET
25 | uses: actions/setup-dotnet@v4
26 | with:
27 | dotnet-version: 6.x.x
28 | - name: Update packages
29 | if: github.event_name == 'push'
30 | run: dotnet run -- update-packages --parallel
31 | working-directory: tools/Build
32 | env:
33 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 | - name: Update packages and create PR
35 | if: github.event_name == 'schedule'
36 | run: dotnet run -- create-update-pr --parallel
37 | working-directory: tools/Build
38 | env:
39 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 |
--------------------------------------------------------------------------------
/tests/UpdatR.E2eTests/TestOutputHelperTextWriterAdapter.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 | using Xunit.Abstractions;
3 |
4 | namespace UpdatR.E2e;
5 |
6 | internal sealed class TestOutputHelperTextWriterAdapter(ITestOutputHelper output) : TextWriter
7 | {
8 | private readonly ITestOutputHelper _output = output;
9 |
10 | private string _currentLine = string.Empty;
11 |
12 | public override Encoding Encoding { get; } = Encoding.UTF8;
13 | public bool Enabled { get; set; } = true;
14 |
15 | public override void Write(char value)
16 | {
17 | if (!Enabled)
18 | {
19 | return;
20 | }
21 |
22 | if (value == '\n')
23 | {
24 | WriteCurrentLine();
25 | }
26 | else
27 | {
28 | _currentLine += value;
29 | }
30 | }
31 |
32 | private void WriteCurrentLine()
33 | {
34 | _output.WriteLine(_currentLine);
35 |
36 | _currentLine = string.Empty;
37 | }
38 |
39 | protected override void Dispose(bool disposing)
40 | {
41 | if (!string.IsNullOrWhiteSpace(_currentLine))
42 | {
43 | WriteCurrentLine();
44 | }
45 |
46 | base.Dispose(disposing);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/Build/nuget.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Oskar Klintrot
5 | Copyright (c) Oskar Klintrot 2022
6 | icon.png
7 | README.md
8 | $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/docs/release-notes.txt"))
9 | MIT
10 | https://github.com/OskarKlintrot/UpdatR
11 | $(SolutionDir)/Artifacts
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | all
27 | runtime; build; native; contentfiles; analyzers
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Dummy.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Exe
33 | net6.0
34 | enable
35 | enable
36 |
37 |
38 |
39 |
40 |
41 |
42 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Dummy.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Has.Previews,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Exe
33 | net6.0
34 | enable
35 | enable
36 |
37 |
38 |
39 |
40 |
41 |
42 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Dummy.--Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Exe
33 | net6.0
34 | enable
35 | enable
36 |
37 |
38 |
39 |
40 |
41 |
42 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Dummy.--Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Has.Previews,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Exe
33 | net6.0
34 | enable
35 | enable
36 |
37 |
38 |
39 |
40 |
41 |
42 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_PackageAndExcludedPackage_When_Update_Then_ExcludeWins_packages=Dummy.- Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | }
13 | ]
14 |
15 |
16 |
17 |
18 | Exe
19 | net6.0
20 | enable
21 | enable
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Exe
33 | net6.0
34 | enable
35 | enable
36 |
37 |
38 |
39 |
40 |
41 |
42 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/Resources/Templates/Dummy.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30114.105
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{D2CF3675-9F2F-47F3-98C8-30FBB35E6088}"
7 | ProjectSection(SolutionItems) = preProject
8 | .config\dotnet-tools.json = .config\dotnet-tools.json
9 | EndProjectSection
10 | EndProject
11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "", "", "{24D4763A-A7DD-40B6-B973-7565FD8F80E6}"
12 | EndProject
13 | Global
14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
15 | Debug|Any CPU = Debug|Any CPU
16 | Release|Any CPU = Release|Any CPU
17 | EndGlobalSection
18 | GlobalSection(SolutionProperties) = preSolution
19 | HideSolutionNode = FALSE
20 | EndGlobalSection
21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 | {24D4763A-A7DD-40B6-B973-7565FD8F80E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {24D4763A-A7DD-40B6-B973-7565FD8F80E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {24D4763A-A7DD-40B6-B973-7565FD8F80E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {24D4763A-A7DD-40B6-B973-7565FD8F80E6}.Release|Any CPU.Build.0 = Release|Any CPU
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdatR.IntegrationTests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | runtime; build; native; contentfiles; analyzers; buildtransitive
17 | all
18 |
19 |
20 | runtime; build; native; contentfiles; analyzers; buildtransitive
21 | all
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | PreserveNewest
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_UnknownPackageId_When_Updating_Then_DoNothing_hasNugetConfig=False.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | 0
3 |
4 | {
5 | "version": 1,
6 | "isRoot": true,
7 | "tools": {
8 | "Dummy.Tool": {
9 | "version": "0.0.1",
10 | "commands": [
11 | "dummy"
12 | ]
13 | }
14 | }
15 | }
16 |
17 |
18 | {
19 | "version": 1,
20 | "isRoot": true,
21 | "tools": {
22 | "Dummy.Tool": {
23 | "version": "0.0.1",
24 | "commands": [
25 | "dummy"
26 | ]
27 | }
28 | }
29 | }
30 |
31 |
32 |
33 |
34 |
35 | Exe
36 | net6.0
37 | enable
38 | enable
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Exe
49 | net6.0
50 | enable
51 | enable
52 |
53 |
54 |
55 |
56 |
57 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_UnknownPackageId_When_Updating_Then_DoNothing_hasNugetConfig=True.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | 2
3 |
4 | {
5 | "version": 1,
6 | "isRoot": true,
7 | "tools": {
8 | "Dummy.Tool": {
9 | "version": "0.0.1",
10 | "commands": [
11 | "dummy"
12 | ]
13 | }
14 | }
15 | }
16 |
17 |
18 | {
19 | "version": 1,
20 | "isRoot": true,
21 | "tools": {
22 | "Dummy.Tool": {
23 | "version": "0.0.2",
24 | "commands": [
25 | "dummy"
26 | ]
27 | }
28 | }
29 | }
30 |
31 |
32 |
33 |
34 |
35 | Exe
36 | net6.0
37 | enable
38 | enable
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Exe
49 | net6.0
50 | enable
51 | enable
52 |
53 |
54 |
55 |
56 |
57 | ]
--------------------------------------------------------------------------------
/src/BuildingBlocks/NuGetLogger.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.Logging;
2 |
3 | namespace BuildingBlocks;
4 |
5 | internal sealed partial class NuGetLogger(ILogger logger) : NuGet.Common.LoggerBase
6 | {
7 | private readonly ILogger _logger = logger;
8 |
9 | public override void Log(NuGet.Common.ILogMessage message)
10 | {
11 | var logLevel = TranslateVerbosity(message.Level);
12 |
13 | Log(_logger, logLevel, message.Level, message.Message);
14 | }
15 |
16 | public override Task LogAsync(NuGet.Common.ILogMessage message)
17 | {
18 | Log(message);
19 |
20 | return Task.CompletedTask;
21 | }
22 |
23 | private static LogLevel TranslateVerbosity(NuGet.Common.LogLevel verbosity) => verbosity switch
24 | {
25 | NuGet.Common.LogLevel.Debug => LogLevel.Trace,
26 | NuGet.Common.LogLevel.Verbose => LogLevel.Debug,
27 | NuGet.Common.LogLevel.Information => LogLevel.Information,
28 | NuGet.Common.LogLevel.Minimal => LogLevel.Warning,
29 | NuGet.Common.LogLevel.Warning => LogLevel.Warning,
30 | NuGet.Common.LogLevel.Error => LogLevel.Error,
31 | _ => throw new NotImplementedException("Unknown verbosity."),
32 | };
33 |
34 | [LoggerMessage(EventId = 0, Message = "nuget: ({NuGetLogLevel}): {Message}")]
35 | static partial void Log(ILogger logger, LogLevel level, NuGet.Common.LogLevel nuGetLogLevel, string message);
36 | }
37 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_PackageWithPrerelease_When_Update_Then_StopAtStableIfPossible_version=0.0.1.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | 1
3 |
4 | {
5 | "version": 1,
6 | "isRoot": true,
7 | "tools": {
8 | "Has.Previews": {
9 | "version": "0.0.1",
10 | "commands": [
11 | "previews"
12 | ]
13 | }
14 | }
15 | }
16 |
17 |
18 | {
19 | "version": 1,
20 | "isRoot": true,
21 | "tools": {
22 | "Has.Previews": {
23 | "version": "0.0.2",
24 | "commands": [
25 | "previews"
26 | ]
27 | }
28 | }
29 | }
30 |
31 |
32 |
33 |
34 |
35 | Exe
36 | net6.0
37 | enable
38 | enable
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Exe
49 | net6.0
50 | enable
51 | enable
52 |
53 |
54 |
55 |
56 |
57 | ]
--------------------------------------------------------------------------------
/src/dotnet-updatr/dotnet-updatr.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Exe
9 |
10 |
11 |
12 | dotnet-updatr
13 | true
14 | update
15 | Tool to update NuGet packages. Supports package references and dotnet-tools.json.
16 | Update,NuGet,Packages,CI,CD
17 | true
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_PackageWithPrerelease_When_Update_Then_StopAtStableIfPossible_version=0.0.1-preview.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | 1
3 |
4 | {
5 | "version": 1,
6 | "isRoot": true,
7 | "tools": {
8 | "Has.Previews": {
9 | "version": "0.0.1-preview",
10 | "commands": [
11 | "previews"
12 | ]
13 | }
14 | }
15 | }
16 |
17 |
18 | {
19 | "version": 1,
20 | "isRoot": true,
21 | "tools": {
22 | "Has.Previews": {
23 | "version": "0.0.2",
24 | "commands": [
25 | "previews"
26 | ]
27 | }
28 | }
29 | }
30 |
31 |
32 |
33 |
34 |
35 | Exe
36 | net6.0
37 | enable
38 | enable
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Exe
49 | net6.0
50 | enable
51 | enable
52 |
53 |
54 |
55 |
56 |
57 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_PackageWithPrerelease_When_Update_Then_StopAtStableIfPossible_version=0.0.3-preview.0.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | 1
3 |
4 | {
5 | "version": 1,
6 | "isRoot": true,
7 | "tools": {
8 | "Has.Previews": {
9 | "version": "0.0.3-preview.0",
10 | "commands": [
11 | "previews"
12 | ]
13 | }
14 | }
15 | }
16 |
17 |
18 | {
19 | "version": 1,
20 | "isRoot": true,
21 | "tools": {
22 | "Has.Previews": {
23 | "version": "0.0.3-preview.1",
24 | "commands": [
25 | "previews"
26 | ]
27 | }
28 | }
29 | }
30 |
31 |
32 |
33 |
34 |
35 | Exe
36 | net6.0
37 | enable
38 | enable
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | Exe
49 | net6.0
50 | enable
51 | enable
52 |
53 |
54 |
55 |
56 |
57 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Has.Previews,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\Dummy.App.csproj
20 | }
21 | ]
22 | }
23 | ]
24 |
25 |
26 |
27 |
28 | Exe
29 | net6.0
30 | enable
31 | enable
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | Exe
43 | net6.0
44 | enable
45 | enable
46 |
47 |
48 |
49 |
50 |
51 |
52 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Has.Previews,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\Dummy.App.csproj
20 | }
21 | ]
22 | }
23 | ]
24 |
25 |
26 |
27 |
28 | Exe
29 | net6.0
30 | enable
31 | enable
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | Exe
43 | net6.0
44 | enable
45 | enable
46 |
47 |
48 |
49 |
50 |
51 |
52 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_ExcludedPackage_When_Update_Then_DoNotUpdate_excludedPackages=Microsoft.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Has.Previews,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\Dummy.App.csproj
20 | }
21 | ]
22 | }
23 | ]
24 |
25 |
26 |
27 |
28 | Exe
29 | net6.0
30 | enable
31 | enable
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | Exe
43 | net6.0
44 | enable
45 | enable
46 |
47 |
48 |
49 |
50 |
51 |
52 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Packages_When_Update_Then_OnlyUpdateThatPackages_packages=Dummy.--has.-.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Has.Previews,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\Dummy.App.csproj
20 | }
21 | ]
22 | }
23 | ]
24 |
25 |
26 |
27 |
28 | Exe
29 | net6.0
30 | enable
31 | enable
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | Exe
43 | net6.0
44 | enable
45 | enable
46 |
47 |
48 |
49 |
50 |
51 |
52 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src-.config.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: dotnet-tools.json
10 | }
11 | ]
12 | }
13 | ]
14 |
15 | {
16 | "version": 1,
17 | "isRoot": true,
18 | "tools": {
19 | "Dummy.Tool": {
20 | "version": "0.0.1",
21 | "commands": [
22 | "dummy"
23 | ]
24 | }
25 | }
26 | }
27 |
28 |
29 | {
30 | "version": 1,
31 | "isRoot": true,
32 | "tools": {
33 | "Dummy.Tool": {
34 | "version": "0.0.2",
35 | "commands": [
36 | "dummy"
37 | ]
38 | }
39 | }
40 | }
41 |
42 |
43 |
44 |
45 |
46 | Exe
47 | net6.0
48 | enable
49 | enable
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Exe
60 | net6.0
61 | enable
62 | enable
63 |
64 |
65 |
66 |
67 |
68 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src-.config-dotnet-tools.json.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy.Tool,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: dotnet-tools.json
10 | }
11 | ]
12 | }
13 | ]
14 |
15 | {
16 | "version": 1,
17 | "isRoot": true,
18 | "tools": {
19 | "Dummy.Tool": {
20 | "version": "0.0.1",
21 | "commands": [
22 | "dummy"
23 | ]
24 | }
25 | }
26 | }
27 |
28 |
29 | {
30 | "version": 1,
31 | "isRoot": true,
32 | "tools": {
33 | "Dummy.Tool": {
34 | "version": "0.0.2",
35 | "commands": [
36 | "dummy"
37 | ]
38 | }
39 | }
40 | }
41 |
42 |
43 |
44 |
45 |
46 | Exe
47 | net6.0
48 | enable
49 | enable
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Exe
60 | net6.0
61 | enable
62 | enable
63 |
64 |
65 |
66 |
67 |
68 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_OutdatedDotnetEf_When_CsprojHasNewer_Then_UpdateToCsprojVersion_path=.config.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: dotnet-ef,
5 | Updates: [
6 | {
7 | Item1: 5.0.5,
8 | Item2: 5.0.12,
9 | Item3: dotnet-tools.json
10 | }
11 | ]
12 | }
13 | ]
14 |
15 | {
16 | "version": 1,
17 | "isRoot": true,
18 | "tools": {
19 | "dotnet-ef": {
20 | "version": "5.0.5",
21 | "commands": [
22 | "dotnet"
23 | ]
24 | }
25 | }
26 | }
27 |
28 |
29 | {
30 | "version": 1,
31 | "isRoot": true,
32 | "tools": {
33 | "dotnet-ef": {
34 | "version": "5.0.12",
35 | "commands": [
36 | "dotnet"
37 | ]
38 | }
39 | }
40 | }
41 |
42 |
43 |
44 |
45 |
46 | Exe
47 | net5.0
48 | enable
49 | enable
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Exe
60 | net5.0
61 | enable
62 | enable
63 |
64 |
65 |
66 |
67 |
68 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_OutdatedDotnetEf_When_CsprojHasNewer_Then_UpdateToCsprojVersion_path=.config-dotnet-tools.json.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: dotnet-ef,
5 | Updates: [
6 | {
7 | Item1: 5.0.5,
8 | Item2: 5.0.12,
9 | Item3: dotnet-tools.json
10 | }
11 | ]
12 | }
13 | ]
14 |
15 | {
16 | "version": 1,
17 | "isRoot": true,
18 | "tools": {
19 | "dotnet-ef": {
20 | "version": "5.0.5",
21 | "commands": [
22 | "dotnet"
23 | ]
24 | }
25 | }
26 | }
27 |
28 |
29 | {
30 | "version": 1,
31 | "isRoot": true,
32 | "tools": {
33 | "dotnet-ef": {
34 | "version": "5.0.12",
35 | "commands": [
36 | "dotnet"
37 | ]
38 | }
39 | }
40 | }
41 |
42 |
43 |
44 |
45 |
46 | Exe
47 | net5.0
48 | enable
49 | enable
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | Exe
60 | net5.0
61 | enable
62 | enable
63 |
64 |
65 |
66 |
67 |
68 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_DryRun_Then_DoNothing.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Dummy.Tool,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\.config\dotnet-tools.json
20 | }
21 | ]
22 | }
23 | ]
24 |
25 | {
26 | "version": 1,
27 | "isRoot": true,
28 | "tools": {
29 | "Dummy.Tool": {
30 | "version": "0.0.1",
31 | "commands": [
32 | "dummy"
33 | ]
34 | }
35 | }
36 | }
37 |
38 |
39 | {
40 | "version": 1,
41 | "isRoot": true,
42 | "tools": {
43 | "Dummy.Tool": {
44 | "version": "0.0.1",
45 | "commands": [
46 | "dummy"
47 | ]
48 | }
49 | }
50 | }
51 |
52 |
53 |
54 |
55 |
56 | Exe
57 | net6.0
58 | enable
59 | enable
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | Exe
70 | net6.0
71 | enable
72 | enable
73 |
74 |
75 |
76 |
77 |
78 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Dummy.Tool,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: .config\dotnet-tools.json
20 | }
21 | ]
22 | }
23 | ]
24 |
25 | {
26 | "version": 1,
27 | "isRoot": true,
28 | "tools": {
29 | "Dummy.Tool": {
30 | "version": "0.0.1",
31 | "commands": [
32 | "dummy"
33 | ]
34 | }
35 | }
36 | }
37 |
38 |
39 | {
40 | "version": 1,
41 | "isRoot": true,
42 | "tools": {
43 | "Dummy.Tool": {
44 | "version": "0.0.2",
45 | "commands": [
46 | "dummy"
47 | ]
48 | }
49 | }
50 | }
51 |
52 |
53 |
54 |
55 |
56 | Exe
57 | net6.0
58 | enable
59 | enable
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | Exe
70 | net6.0
71 | enable
72 | enable
73 |
74 |
75 |
76 |
77 |
78 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_Valid_Then_Update_paths=.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Dummy.Tool,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\.config\dotnet-tools.json
20 | }
21 | ]
22 | }
23 | ]
24 |
25 | {
26 | "version": 1,
27 | "isRoot": true,
28 | "tools": {
29 | "Dummy.Tool": {
30 | "version": "0.0.1",
31 | "commands": [
32 | "dummy"
33 | ]
34 | }
35 | }
36 | }
37 |
38 |
39 | {
40 | "version": 1,
41 | "isRoot": true,
42 | "tools": {
43 | "Dummy.Tool": {
44 | "version": "0.0.2",
45 | "commands": [
46 | "dummy"
47 | ]
48 | }
49 | }
50 | }
51 |
52 |
53 |
54 |
55 |
56 | Exe
57 | net6.0
58 | enable
59 | enable
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | Exe
70 | net6.0
71 | enable
72 | enable
73 |
74 |
75 |
76 |
77 |
78 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_Valid_Then_Update_paths=Dummy.sln.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: src\Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Dummy.Tool,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: src\.config\dotnet-tools.json
20 | }
21 | ]
22 | }
23 | ]
24 |
25 | {
26 | "version": 1,
27 | "isRoot": true,
28 | "tools": {
29 | "Dummy.Tool": {
30 | "version": "0.0.1",
31 | "commands": [
32 | "dummy"
33 | ]
34 | }
35 | }
36 | }
37 |
38 |
39 | {
40 | "version": 1,
41 | "isRoot": true,
42 | "tools": {
43 | "Dummy.Tool": {
44 | "version": "0.0.2",
45 | "commands": [
46 | "dummy"
47 | ]
48 | }
49 | }
50 | }
51 |
52 |
53 |
54 |
55 |
56 | Exe
57 | net6.0
58 | enable
59 | enable
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | Exe
70 | net6.0
71 | enable
72 | enable
73 |
74 |
75 |
76 |
77 |
78 | ]
--------------------------------------------------------------------------------
/tests/UpdatR.IntegrationTests/UpdaterTests.Given_Target_When_Valid_Then_Update_paths=src-Dummy.App.csproj.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | {
4 | PackageId: Dummy,
5 | Updates: [
6 | {
7 | Item1: 0.0.1,
8 | Item2: 0.0.2,
9 | Item3: Dummy.App.csproj
10 | }
11 | ]
12 | },
13 | {
14 | PackageId: Dummy.Tool,
15 | Updates: [
16 | {
17 | Item1: 0.0.1,
18 | Item2: 0.0.2,
19 | Item3: .config\dotnet-tools.json
20 | }
21 | ]
22 | }
23 | ]
24 |
25 | {
26 | "version": 1,
27 | "isRoot": true,
28 | "tools": {
29 | "Dummy.Tool": {
30 | "version": "0.0.1",
31 | "commands": [
32 | "dummy"
33 | ]
34 | }
35 | }
36 | }
37 |
38 |
39 | {
40 | "version": 1,
41 | "isRoot": true,
42 | "tools": {
43 | "Dummy.Tool": {
44 | "version": "0.0.2",
45 | "commands": [
46 | "dummy"
47 | ]
48 | }
49 | }
50 | }
51 |
52 |
53 |
54 |
55 |
56 | Exe
57 | net6.0
58 | enable
59 | enable
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | Exe
70 | net6.0
71 | enable
72 | enable
73 |
74 |
75 |
76 |
77 |
78 | ]
--------------------------------------------------------------------------------
/mdsource/cli-usage.txt:
--------------------------------------------------------------------------------
1 | Usage:
2 | update [] [options]
3 |
4 | Arguments:
5 | Path to solution or project(s). Defaults to current folder. Target can be a specific file or folder. If target is a folder then all *.csproj-files and dotnet-config.json-files will be processed. [default: .]
6 |
7 | Options:
8 | --package Package to update. Supports * as wildcard. Will update all unless specified. []
9 | --exclude-package Package to exclude. Supports * as wildcard. []
10 | --output