Skip to content

Commit

Permalink
Merge pull request #660 from arturcic/feature/cpm-nuget
Browse files Browse the repository at this point in the history
convert nuget packages to use central package management
  • Loading branch information
gep13 authored Jan 10, 2025
2 parents 1fd47d1 + 93e778b commit 443d62c
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 108 deletions.
10 changes: 5 additions & 5 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="IDisposableAnalyzers" Version="4.0.7">
<PackageReference Include="Serilog" />
<PackageReference Include="IDisposableAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PackageReference Include="StyleCop.Analyzers">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="4.12.10">
<PackageReference Include="Roslynator.Analyzers">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
37 changes: 37 additions & 0 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="ApprovalTests" Version="6.0.0" />
<PackageVersion Include="AutoMapper" Version="12.0.1" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.3" />
<PackageVersion Include="Destructurama.Attributed" Version="4.0.0" />
<PackageVersion Include="IDisposableAnalyzers" Version="4.0.7" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="NGitLab" Version="7.0.1" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="Octokit" Version="12.0.0" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.10" />
<PackageVersion Include="Scriban" Version="5.10.0" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="seriloganalyzer" Version="0.15.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="TextCopy" Version="6.2.1" />
<PackageVersion Include="YamlDotNet" Version="13.7.1" />
</ItemGroup>
</Project>
26 changes: 13 additions & 13 deletions src/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
<ProjectReference Include="..\GitReleaseManager.Core\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Destructurama.Attributed" Version="4.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="CommandLineParser" />
<PackageReference Include="Destructurama.Attributed" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.SourceLink.GitHub">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="seriloganalyzer" Version="0.15.0" />
<PackageReference Include="NGitLab" />
<PackageReference Include="Octokit" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Serilog.Sinks.Debug" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="seriloganalyzer" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<LangVersion>9.0</LangVersion>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Title>GitReleaseManager.Core.Tests</Title>
<Description>Test Project for GitReleaseManager.Core</Description>
<NoWarn>$(NoWarn);CA1707;Serilog004;</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitReleaseManager.Core\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="coverlet.msbuild">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="ApprovalTests" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="ApprovalTests" />
<PackageReference Include="Microsoft.SourceLink.GitHub">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PackageReference Include="NGitLab" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Octokit" />
<PackageReference Include="Shouldly" />
</ItemGroup>
</Project>
36 changes: 18 additions & 18 deletions src/GitReleaseManager.Core/GitReleaseManager.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Destructurama.Attributed" Version="4.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="CommandLineParser" />
<PackageReference Include="Destructurama.Attributed" />
<PackageReference Include="Microsoft.SourceLink.GitHub">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Scriban" Version="5.10.0" />
<PackageReference Include="seriloganalyzer" Version="0.15.0" />
<PackageReference Include="YamlDotNet" Version="13.7.1" />
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="NGitLab" />
<PackageReference Include="Octokit" />
<PackageReference Include="Scriban" />
<PackageReference Include="seriloganalyzer" />
<PackageReference Include="YamlDotNet" />
<PackageReference Include="AutoMapper" />
</ItemGroup>
<ItemGroup>
<Compile Update="Templates\ReleaseTemplates.g.cs">
Expand All @@ -38,13 +38,13 @@
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="Templates\ReleaseTemplates.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>ReleaseTemplates.g.cs</LastGenOutput>
</None>
<None Include="Templates/**/*.sbn" />
<None Update="Templates\ReleaseTemplates.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>ReleaseTemplates.g.cs</LastGenOutput>
</None>
<None Include="Templates/**/*.sbn" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/GitReleaseManager.Core/VcsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task DiscardReleaseAsync(string owner, string repository, string ta
}
}

public async Task AddAssetsAsync(string owner, string repository, string tagName, IList<string> assets) => await AddAssetsAsync(owner, repository, tagName, assets, null);
public async Task AddAssetsAsync(string owner, string repository, string tagName, IList<string> assets) => await AddAssetsAsync(owner, repository, tagName, assets, null).ConfigureAwait(false);

private async Task AddAssetsAsync(string owner, string repository, string tagName, IList<string> assets, Release currentRelease)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@
<NoWarn>$(NoWarn);CA1707;Serilog004;</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitReleaseManager.Core\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="coverlet.msbuild">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PackageReference Include="NGitLab" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="TextCopy" Version="6.2.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Shouldly" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="TextCopy" />
<PackageReference Include="System.Net.Http" />
</ItemGroup>
</Project>
</Project>
34 changes: 17 additions & 17 deletions src/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@
<NoWarn>$(NoWarn);CA1707;Serilog004;</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GitReleaseManager.Core\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="6.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="coverlet.msbuild">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="ApprovalTests" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="ApprovalTests" />
<PackageReference Include="Microsoft.SourceLink.GitHub">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PackageReference Include="NGitLab" />
<PackageReference Include="NSubstitute" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Octokit" />
</ItemGroup>
</Project>
29 changes: 13 additions & 16 deletions src/GitReleaseManager.Tool/GitReleaseManager.Tool.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<LangVersion>8.0</LangVersion>
<OutputType>Exe</OutputType>
<AssemblyName>GitReleaseManager</AssemblyName>

<PackAsTool>true</PackAsTool>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<ToolCommandName>dotnet-gitreleasemanager</ToolCommandName>
<PackageId>GitReleaseManager.Tool</PackageId>

<Title>GitReleaseManager Tool</Title>
<Authors>GitTools Contributors</Authors>
<PackageProjectUrl>https://github.com/GitTools/GitReleaseManager</PackageProjectUrl>
Expand All @@ -31,24 +28,24 @@
<ProjectReference Include="..\GitReleaseManager.Core\GitReleaseManager.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Destructurama.Attributed" Version="4.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<PackageReference Include="CommandLineParser" />
<PackageReference Include="Destructurama.Attributed" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.SourceLink.GitHub">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NGitLab" Version="7.0.1" />
<PackageReference Include="Octokit" Version="12.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="seriloganalyzer" Version="0.15.0" />
<PackageReference Include="NGitLab" />
<PackageReference Include="Octokit" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Serilog.Sinks.Debug" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="seriloganalyzer" />
</ItemGroup>
<ItemGroup>
<None Include="../../icons/package_icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
</Project>
Loading

0 comments on commit 443d62c

Please sign in to comment.