Skip to content

Commit

Permalink
[ODS-6171] Migrate SdkGen to .NET 8 (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
JBrenesSimpat authored Jan 31, 2024
1 parent 02d9098 commit e44b2b9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/Pkg EdFi.Ods.CodeGen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- main-6x
paths:
- Utilities/CodeGeneration/**/*
- Application/EdFi.Common/**/*
workflow_dispatch:

env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
</metadata>
<files>
<file src="readme.txt" target="" />
<file src="csharp\src\EdFi.OdsApi.Sdk\bin\$configuration$\net6.0\EdFi.OdsApi.Sdk.dll" target="lib\net6.0" />
<file src="csharp\src\EdFi.OdsApi.Sdk\bin\$configuration$\net8.0\EdFi.OdsApi.Sdk.dll" target="lib\net8.0" />
</files>
</package>
20 changes: 10 additions & 10 deletions Utilities/SdkGen/EdFi.SdkGen.Console/EdFi.SdkGen.Console.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<None Remove="readme.txt" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Content Include="readme.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="log4net" Version="2.0.13" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None Update="EdFi.OdsApi.Sdk.nuspec">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="log4net.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ private void RunCliCodegen(IEnumerable<OpenApiDetail> apiEndpoints)
// code-gen paramaters
string[] @params =
{
$"-jar {_options.CliExecutableFullName()}", "generate", "-g csharp-netcore", $"-i {apiEndpoint.EndpointUri}",
$"-jar {_options.CliExecutableFullName()}", "generate", "-g csharp", $"-i {apiEndpoint.EndpointUri}",
$"--api-package {apiPackage}", $"--model-package {modelPackage}", $"-o {_options.OutputFolder}",
$"--additional-properties packageName={_options.Namespace},targetFramework=net6.0,netCoreProjectFile=true",
$"--additional-properties packageName={_options.Namespace},targetFramework=net8.0,netCoreProjectFile=true",
"--global-property modelTests=false --global-property apiTests=false --skip-validate-spec"
};

Expand Down
2 changes: 1 addition & 1 deletion Utilities/SdkGen/EdFi.SdkGen.Console/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public sealed class Options
[Option(
'v',
"cliVersion",
Default = "6.0.1",
Default = "7.2.0",
HelpText = "the version of openapi-codegen-cli to download")]
public string CliVersion { get; set; }

Expand Down

0 comments on commit e44b2b9

Please sign in to comment.