-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(import): Add integration tests and template project for csharp
Signed-off-by: Scott Kane <[email protected]>
- Loading branch information
Showing
12 changed files
with
129 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
templates/csharp-app/MyApp/Cdk8s.Imports/Cdk8s.Imports.esproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.586930"> | ||
|
||
<PropertyGroup> | ||
<BuildCommand>npm run import</BuildCommand> | ||
<SolutionPath>$(SolutionDir)Strive.Platform.Automation.sln</SolutionPath> | ||
</PropertyGroup> | ||
|
||
<Target Name="RemoveProjectsFromSolution" BeforeTargets="Build"> | ||
<ItemGroup> | ||
<ProjectFiles Include="$(SolutionDir)Imports\Imports.*\**\*.csproj" /> | ||
</ItemGroup> | ||
|
||
<Exec Command="dotnet sln $(SolutionPath) remove @(ProjectFiles -> '"%(FullPath)"', ' ')" /> | ||
</Target> | ||
|
||
<Target Name="AddProjectsToSolution" AfterTargets="Build"> | ||
<ItemGroup> | ||
<ProjectFiles Include="$(SolutionDir)Imports\Imports.*\**\*.csproj" /> | ||
</ItemGroup> | ||
|
||
<Exec Command="dotnet sln $(SolutionPath) add @(ProjectFiles -> '"%(FullPath)"', ' ')" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: csharp | ||
imports: | ||
- k8s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "imports", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"import": "cdk8s import -o ../Imports" | ||
}, | ||
"dependencies": { | ||
"cdk8s-cli": "{{ cdk8s_cli_spec }}" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp", "MyApp\MyApp.csproj", "{D0E5713E-D58F-482D-92C0-504C9AB84DD5}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cdk8s.Imports", "Cdk8s.Imports\Cdk8s.Imports.esproj", "{5337F2AB-8B52-48F8-9AA5-0DC7CEFAF8A4}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{D0E5713E-D58F-482D-92C0-504C9AB84DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D0E5713E-D58F-482D-92C0-504C9AB84DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D0E5713E-D58F-482D-92C0-504C9AB84DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D0E5713E-D58F-482D-92C0-504C9AB84DD5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{5337F2AB-8B52-48F8-9AA5-0DC7CEFAF8A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5337F2AB-8B52-48F8-9AA5-0DC7CEFAF8A4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5337F2AB-8B52-48F8-9AA5-0DC7CEFAF8A4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5337F2AB-8B52-48F8-9AA5-0DC7CEFAF8A4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Imports\Imports.*\**\*.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Org.Cdk8s" Version="{{ cdk8s_core_version }}" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Constructs; | ||
using Org.Cdk8s; | ||
|
||
var app = new App(); | ||
_ = new Main(app, "{{ $base }}"); | ||
|
||
app.Synth(); | ||
|
||
public class Main(Construct scope, string id, IChartProps? props = null) : Chart(scope, id, props); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters