Skip to content

Commit

Permalink
don't pack netframework as tool, as this is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
sensslen committed Feb 26, 2024
1 parent 22162d3 commit 6ca5dae
Show file tree
Hide file tree
Showing 11 changed files with 213 additions and 30 deletions.
48 changes: 44 additions & 4 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ jobs:
run: dotnet restore -p:TargetFramework=${{ matrix.targetFramework }}

- name: build
run: dotnet publish ./src/NuGetUtility/NuGetUtility.csproj --configuration Release -o ./release -f ${{ matrix.targetFramework }} --no-restore
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj --configuration Release -o ./release -f ${{ matrix.targetFramework }} --no-restore

- name: check
run: dotnet ./release/NuGetUtility.dll -ji ./.github/workflows/assets/${{ matrix.project }}/projectsToCheck.json -t -a ./.github/workflows/assets/${{ matrix.project }}/allowedLicenses.json -o JsonPretty -override ./.github/workflows/assets/${{ matrix.project }}/overwritePackageInformation.json -ignore ./.github/workflows/assets/${{ matrix.project }}/ignorePackages.json -mapping ./.github/workflows/assets/${{ matrix.project }}/urlToLicenseMapping.json -d ./licenses/${{ matrix.project }}/${{ matrix.targetFramework }}
run: dotnet ./release/NuGetLicenseCore.dll -ji ./.github/workflows/assets/${{ matrix.project }}/projectsToCheck.json -t -a ./.github/workflows/assets/${{ matrix.project }}/allowedLicenses.json -o JsonPretty -override ./.github/workflows/assets/${{ matrix.project }}/overwritePackageInformation.json -ignore ./.github/workflows/assets/${{ matrix.project }}/ignorePackages.json -mapping ./.github/workflows/assets/${{ matrix.project }}/urlToLicenseMapping.json -d ./licenses/${{ matrix.project }}/${{ matrix.targetFramework }}

- name: show downloaded licenses
shell: pwsh
Expand All @@ -124,6 +124,46 @@ jobs:
Get-Content $file.FullName
Write-Host ::endgroup::
}
check_licenses_framework:
runs-on: windows-latest
strategy:
matrix:
project: [App, Tests]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: nuget/setup-nuget@v2
- run: nuget restore NuGetUtility.sln

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: fully qualify artifacts path
id: release_path
shell: pwsh
run: |
$path = [System.IO.Path]::GetFullPath("./release");
echo "publish to path: $path"
echo "path={$path}" >> Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
- name: build
run: msbuild ./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj /t:Publish /p:configuration=Release /p:PublishDir=${{ steps.release_path.path }}/net472

- name: check
run: ./release/NuGetLicenseFramework.exe -ji ./.github/workflows/assets/${{ matrix.project }}/projectsToCheck.json -t -a ./.github/workflows/assets/${{ matrix.project }}/allowedLicenses.json -o JsonPretty -override ./.github/workflows/assets/${{ matrix.project }}/overwritePackageInformation.json -ignore ./.github/workflows/assets/${{ matrix.project }}/ignorePackages.json -mapping ./.github/workflows/assets/${{ matrix.project }}/urlToLicenseMapping.json -d ./licenses/${{ matrix.project }}

- name: show downloaded licenses
shell: pwsh
run: |
foreach($file in Get-ChildItem -Path ./licenses/${{ matrix.project }})
{
Write-Host ::group::$file
Get-Content $file.FullName
Write-Host ::endgroup::
}
check_version_command:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -162,12 +202,12 @@ jobs:
version_format: "${major}.${minor}.${patch}-test${increment}"

- name: build
run: dotnet publish ./src/NuGetUtility/NuGetUtility.csproj --configuration Release -o ./release -f ${{ matrix.targetFramework }} --no-restore -p:Version=${{ steps.version.outputs.version }}
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj --configuration Release -o ./release -f ${{ matrix.targetFramework }} --no-restore -p:Version=${{ steps.version.outputs.version }}

- name: check app version
shell: pwsh
run: |
$cmdOutput = dotnet ./release/NuGetUtility.dll --version | Out-String
$cmdOutput = dotnet ./release/NuGetLicenseCore.dll --version | Out-String
if(!($cmdOutput.Trim() -like '${{ steps.version.outputs.version }}')) {
Write-Host Versions do not match: read $cmdOutput, expected ${{ steps.version.outputs.version }}
exit 1;
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/assets/App/projectsToCheck.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["./src/NuGetUtility/NuGetUtility.csproj"]
["./src/NuGetLicenseCore/NuGetLicenseCore.csproj","./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj"]
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ jobs:
id: artifacts_path
shell: pwsh
run: |
New-Item -ItemType "directory" -Path "./artifacts"
$path = Resolve-Path ./artifacts
echo "::set-output name=path::$path"
$path = [System.IO.Path]::GetFullPath("./artifacts");
echo "publish to path: $path"
echo "path={$path}" >> Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
- name: Publish the application binaries (.net6)
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net6 /p:TargetFramework=net6.0 /p:Version=${{ steps.version.outputs.full_without_prefix }}
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-restore -o ${{ steps.artifacts_path.path }}/net6 -f net6.0 -p:Version=${{ steps.version.outputs.full_without_prefix }}
- name: Publish the application binaries (.net7)
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net7 /p:TargetFramework=net7.0 /p:Version=${{ steps.version.outputs.full_without_prefix }}
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-restore -o ${{ steps.artifacts_path.path }}/net7 -f net7.0 -p:Version=${{ steps.version.outputs.full_without_prefix }}
- name: Publish the application binaries (.net8)
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net8 /p:TargetFramework=net8.0 /p:Version=${{ steps.version.outputs.full_without_prefix }}
run: dotnet publish ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-restore -o ${{ steps.artifacts_path.path }}/net8 -f net8.0 -p:Version=${{ steps.version.outputs.full_without_prefix }}
- name: Publish the application binaries (.net472)
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Publish /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}}/net472 /p:TargetFramework=net472 /p:Version=${{ steps.version.outputs.full_without_prefix }}
run: msbuild ./src/NuGetLicenseFramework/NuGetLicenseFramework.csproj /t:Publish /p:configuration=Release /p:PublishDir=${{ steps.artifacts_path.path }}/net472 /p:Version=${{ steps.version.outputs.full_without_prefix }}
- name: Create nuget package
run: msbuild ./src/NuGetUtility/NuGetUtility.csproj /t:Pack /p:configuration=Release /p:OutDir=${{ steps.artifacts_path.path}} /p:Version=${{ steps.version.outputs.full_without_prefix }}
run: dotnet pack ./src/NuGetLicenseCore/NuGetLicenseCore.csproj -c Release --no-build -o ${{ steps.artifacts_path.path }} -p:Version=${{ steps.version.outputs.full_without_prefix }}

- name: Zip artifacts
uses: thedoctor0/[email protected]
with:
Expand All @@ -81,4 +81,4 @@ jobs:
- name: publish nuget package to nuget.org
id: publish_nuget
run: dotnet nuget push ${{ steps.artifacts_path.path}}/*.nupkg -s 'https://api.nuget.org/v3/index.json' -k ${{secrets.NUGET_KEY}} --skip-duplicate
run: dotnet nuget push ${{ steps.artifacts_path.path }}/*.nupkg -s 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGET_KEY }} --skip-duplicate
42 changes: 42 additions & 0 deletions NuGetUtility.sln
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SimpleCppProject", "tests\targets\SimpleCppProject\SimpleCppProject.vcxproj", "{380FBD90-2CF0-4F83-A58E-EB98CE2EAE15}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGetLicenseCore", "src\NuGetLicenseCore\NuGetLicenseCore.csproj", "{FBA6622A-C9E3-4250-AB79-35F02CAD2419}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGetLicenseFramework", "src\NuGetLicenseFramework\NuGetLicenseFramework.csproj", "{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -184,6 +188,42 @@ Global
{380FBD90-2CF0-4F83-A58E-EB98CE2EAE15}.TestWindows|x64.Build.0 = Debug|x64
{380FBD90-2CF0-4F83-A58E-EB98CE2EAE15}.TestWindows|x86.ActiveCfg = Debug|Win32
{380FBD90-2CF0-4F83-A58E-EB98CE2EAE15}.TestWindows|x86.Build.0 = Debug|Win32
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Debug|x64.ActiveCfg = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Debug|x64.Build.0 = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Debug|x86.ActiveCfg = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Debug|x86.Build.0 = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Release|Any CPU.Build.0 = Release|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Release|x64.ActiveCfg = Release|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Release|x64.Build.0 = Release|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Release|x86.ActiveCfg = Release|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.Release|x86.Build.0 = Release|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.TestWindows|Any CPU.ActiveCfg = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.TestWindows|Any CPU.Build.0 = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.TestWindows|x64.ActiveCfg = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.TestWindows|x64.Build.0 = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.TestWindows|x86.ActiveCfg = Debug|Any CPU
{FBA6622A-C9E3-4250-AB79-35F02CAD2419}.TestWindows|x86.Build.0 = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Debug|x64.ActiveCfg = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Debug|x64.Build.0 = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Debug|x86.ActiveCfg = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Debug|x86.Build.0 = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Release|Any CPU.Build.0 = Release|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Release|x64.ActiveCfg = Release|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Release|x64.Build.0 = Release|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Release|x86.ActiveCfg = Release|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.Release|x86.Build.0 = Release|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.TestWindows|Any CPU.ActiveCfg = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.TestWindows|Any CPU.Build.0 = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.TestWindows|x64.ActiveCfg = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.TestWindows|x64.Build.0 = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.TestWindows|x86.ActiveCfg = Debug|Any CPU
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F}.TestWindows|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -198,6 +238,8 @@ Global
{3DDEC6CB-4FDA-49D1-A358-06BE9200C174} = {FA92392F-D895-4D1E-A5ED-E6DC3C08223E}
{3150479E-4370-408D-8A93-7C0CDC281CC3} = {FA92392F-D895-4D1E-A5ED-E6DC3C08223E}
{380FBD90-2CF0-4F83-A58E-EB98CE2EAE15} = {FA92392F-D895-4D1E-A5ED-E6DC3C08223E}
{FBA6622A-C9E3-4250-AB79-35F02CAD2419} = {D2AB2D00-1F48-487D-BFE0-99FDB4E071CC}
{DE079B9C-B6BA-4D53-8B83-03D3CBD4027F} = {D2AB2D00-1F48-487D-BFE0-99FDB4E071CC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {70887D40-0182-4C32-BFA1-B5A02E405F11}
Expand Down
40 changes: 40 additions & 0 deletions src/NuGetLicenseCore/NuGetLicenseCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<PackageType>DotnetTool</PackageType>
<RepositoryType>git</RepositoryType>
<Version>100.100.100</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<PackageId>nuget-license</PackageId>
<ToolCommandName>nuget-license</ToolCommandName>
<Authors>Tom Chavakis,Simon Ensslen</Authors>
<Company>-</Company>
<Title>.NET Tool to print and validate the licenses of dotnet project(s)</Title>
<PackageProjectUrl>https://github.com/sensslen/nuget-license</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' == ''">false</GeneratePackageOnBuild>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;TestWindows</Configurations>
<Platforms>AnyCPU</Platforms>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>A .net tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.</Description>
</PropertyGroup>

<ItemGroup>
<Content Include="..\..\README.md">
<Pack>true</Pack>
<PackagePath>README.md</PackagePath>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NuGetUtility\NuGetUtility.csproj" />
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions src/NuGetLicenseCore/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the projects contributors.
// The license conditions are provided in the LICENSE file located in the project root

using McMaster.Extensions.CommandLineUtils;
using NuGetUtility;

namespace NuGetLicenseCore
{
public static class Program
{
public static async Task Main(string[] args)
{
var lifetime = new AppLifetime();
int returnCode = await CommandLineApplication.ExecuteAsync<NuGetUtility.Program>(args, lifetime.Token);
lifetime.Done(returnCode);
}
}
}
36 changes: 36 additions & 0 deletions src/NuGetLicenseFramework/NuGetLicenseFramework.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<RepositoryType>git</RepositoryType>
<Version>100.100.100</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<PackageId>nuget-license</PackageId>
<ToolCommandName>nuget-license</ToolCommandName>
<Authors>Tom Chavakis,Simon Ensslen</Authors>
<Company>-</Company>
<Title>.NET Tool to print and validate the licenses of dotnet project(s)</Title>
<PackageProjectUrl>https://github.com/sensslen/nuget-license</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;TestWindows</Configurations>
<Platforms>AnyCPU</Platforms>
<Description>A .net tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.</Description>
<LangVersion>10.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<Content Include="..\..\README.md">
<Pack>true</Pack>
<PackagePath>README.md</PackagePath>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NuGetUtility\NuGetUtility.csproj" />
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions src/NuGetLicenseFramework/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Licensed to the projects contributors.
// The license conditions are provided in the LICENSE file located in the project root

using McMaster.Extensions.CommandLineUtils;
using NuGetUtility;

namespace NuGetLicenseFramework
{
public static class Program
{
public static async Task Main(string[] args)
{
var lifetime = new AppLifetime();
int returnCode = await CommandLineApplication.ExecuteAsync<NuGetUtility.Program>(args, lifetime.Token);
lifetime.Done(returnCode);
}
}
}
2 changes: 1 addition & 1 deletion src/NuGetUtility/AppLifetime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace NuGetUtility
/// <summary>
/// Inspired by: https://github.com/dotnet/aspnetcore/search?q=WebHostLifetime
/// </summary>
internal class AppLifetime
public class AppLifetime
{
private readonly CancellationTokenSource _cts = new CancellationTokenSource();
private readonly ManualResetEventSlim _doneEvent = new ManualResetEventSlim();
Expand Down
10 changes: 3 additions & 7 deletions src/NuGetUtility/NuGetUtility.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<PackageType>DotnetTool</PackageType>
<RepositoryType>git</RepositoryType>
<Version>100.100.100</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<PackageId>nuget-license</PackageId>
<ToolCommandName>nuget-license</ToolCommandName>
<PackageId>nuget-license-core</PackageId>
<Authors>Tom Chavakis,Simon Ensslen</Authors>
<Company>-</Company>
<Title>.NET Core Tool to print and validate the licenses of dotnet project(s)</Title>
<Title>.NET Tool to print and validate the licenses of dotnet project(s)</Title>
<PackageProjectUrl>https://github.com/sensslen/nuget-license</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' == ''">false</GeneratePackageOnBuild>
Expand All @@ -23,7 +19,7 @@
<Configurations>Debug;Release;TestWindows</Configurations>
<Platforms>AnyCPU</Platforms>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>A .net core tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.</Description>
<Description>A .net tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.</Description>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
Expand Down
7 changes: 0 additions & 7 deletions src/NuGetUtility/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,6 @@ public class Program
private static string GetVersion()
=> typeof(Program).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? string.Empty;

public static async Task Main(string[] args)
{
var lifetime = new AppLifetime();
int returnCode = await CommandLineApplication.ExecuteAsync<Program>(args, lifetime.Token);
lifetime.Done(returnCode);
}

private async Task<int> OnExecuteAsync(CancellationToken cancellationToken)
{
using var httpClient = new HttpClient();
Expand Down

0 comments on commit 6ca5dae

Please sign in to comment.