Skip to content

Commit 2ebd3d4

Browse files
Add wrench cookbook project
1 parent 24518e2 commit 2ebd3d4

File tree

9 files changed

+105
-0
lines changed

9 files changed

+105
-0
lines changed

Tools/CI/Graphics-recipes.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Graphics.Cookbook", "Graphics.Cookbook.csproj", "{A5A71435-C891-4C78-989C-2713DAA7B3B8}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{A5A71435-C891-4C78-989C-2713DAA7B3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{A5A71435-C891-4C78-989C-2713DAA7B3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{A5A71435-C891-4C78-989C-2713DAA7B3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{A5A71435-C891-4C78-989C-2713DAA7B3B8}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal

Tools/CI/Graphics.Cookbook.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="RecipeEngine.Modules.Wrench" Version="0.11.0" />
12+
</ItemGroup>
13+
14+
</Project>

Tools/CI/Program.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Graphics.Cookbook.Settings;
2+
using RecipeEngine;
3+
using RecipeEngine.Modules.Wrench.Helpers;
4+
5+
6+
// ReSharper disable once CheckNamespace
7+
public static class Program
8+
{
9+
public static int Main(string[] args)
10+
{
11+
var settings = new GraphicsSettings();
12+
13+
// ReSharper disable once UnusedVariable
14+
var engine = EngineFactory
15+
.Create()
16+
.ScanAll()
17+
.WithWrenchModule(settings.Wrench)
18+
.GenerateAsync().Result;
19+
return engine;
20+
}
21+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"profiles": {
3+
"Graphics.Cookbook": {
4+
"commandName": "Project"
5+
}
6+
}
7+
}

Tools/CI/Settings/GraphicsSettings.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using RecipeEngine.Api.Settings;
2+
using RecipeEngine.Modules.Wrench.Models;
3+
using RecipeEngine.Modules.Wrench.Settings;
4+
5+
namespace Graphics.Cookbook.Settings;
6+
7+
public class GraphicsSettings : AnnotatedSettingsBase
8+
{
9+
// Path from the root of the repository where packages are located.
10+
readonly string[] PackagesRootPaths = {"."};
11+
12+
// update this to list all packages in this repo that you want to release.
13+
Dictionary<string, PackageOptions> PackageOptions = new()
14+
{
15+
{
16+
"com.unity.postprocessing",
17+
new PackageOptions() { ReleaseOptions = new ReleaseOptions() { IsReleasing = true } }
18+
}
19+
};
20+
21+
public GraphicsSettings()
22+
{
23+
Wrench = new WrenchSettings(
24+
PackagesRootPaths,
25+
PackageOptions
26+
);
27+
}
28+
29+
public WrenchSettings Wrench { get; private set; }
30+
}

Tools/CI/global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.0",
4+
"rollForward": "latestMinor",
5+
"allowPrerelease": false
6+
}
7+
}

Tools/CI/nuget.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="Artifactory Prd" value="https://artifactory.prd.it.unity3d.com/artifactory/api/nuget/v3/nuget"/>
5+
</packageSources>
6+
</configuration>

Tools/CI/regenerate.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd %~dp0../../
2+
dotnet run --project Tools\CI\Graphics.Cookbook.csproj

Tools/CI/regenerate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd $(dirname "$0")/../../
2+
dotnet run --project Tools\CI\Graphics.Cookbook.csproj

0 commit comments

Comments
 (0)