Skip to content

Commit

Permalink
Merge pull request #11 from ricaun-io/develop
Browse files Browse the repository at this point in the history
## [0.0.9] / 2021-12-17
  • Loading branch information
ricaun authored Dec 17, 2021
2 parents febeb26 + 45bb42b commit f1c7f3d
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 10 deletions.
10 changes: 8 additions & 2 deletions Build/.nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Folder": {
"type": "string"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
Expand All @@ -34,6 +37,9 @@
"VSCode"
]
},
"Name": {
"type": "string"
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
Expand Down Expand Up @@ -66,7 +72,7 @@
"Build",
"Clean",
"Compile",
"ExampleCompile",
"CompileExample",
"GitRelease",
"Pack",
"Release",
Expand All @@ -87,7 +93,7 @@
"Build",
"Clean",
"Compile",
"ExampleCompile",
"CompileExample",
"GitRelease",
"Pack",
"Release",
Expand Down
2 changes: 1 addition & 1 deletion Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using ricaun.Nuke.Components;

[CheckBuildProjectConfigurations]
class Build : NukeBuild, IPublishPack, IExampleCompile
class Build : NukeBuild, IPublishPack, ICompileExample
{
string IHazContent.Folder => "Release";
string IHazRelease.Folder => "ReleasePack";
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.0.9] / 2021-12-17
- Clear Build
- Test Native Example Compile
- Rename Example Project
- Add ICompileExample
- Add IHazExample
- Add Native Example Compile

## [0.0.8] / 2021-12-17
- Release Example Project
- Add Example Project
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ricaun.Nuke.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Project", "Project", "{4EED
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Examples.csproj", "{027171E5-2FB6-4A4C-A8DE-F3E148B47FFB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ricaun.Nuke.Example", "Examples\ricaun.Nuke.Example.csproj", "{027171E5-2FB6-4A4C-A8DE-F3E148B47FFB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
using Nuke.Common;
using ricaun.Nuke.Components;
using ricaun.Nuke.Extensions;

public interface IExampleCompile : ICompile, ISign, IRelease, IHazContent
namespace ricaun.Nuke.Components
{
Target ExampleCompile => _ => _
public interface ICompileExample : IHazExample, ICompile, ISign, IRelease, IHazContent, INukeBuild
{
Target CompileExample => _ => _
.TriggeredBy(Compile)
.Before(Sign)
.Executes(() =>
{
Solution.BuildOtherProject("Examples", (project) =>
Solution.BuildOtherProject(GetExampleProject(), (project) =>
{
SignProject(project);
var folder = GetContentDirectory(project);
var folder = ExampleDirectory;
var fileName = project.Name;
var zipFile = ReleaseDirectory / $"{fileName}.zip";
ZipExtension.CreateFromDirectory(folder, zipFile);
});
});
}
}
27 changes: 27 additions & 0 deletions ricaun.Nuke/Components/IHazExample.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.ValueInjection;
using ricaun.Nuke.Extensions;
namespace ricaun.Nuke.Components
{
public interface IHazExample : IHazSolution, INukeBuild
{
/// <summary>
/// Folder Example
/// </summary>
[Parameter]
string Folder => ValueInjectionUtility.TryGetValue(() => Folder) ?? "Release";

/// <summary>
/// Example Project Name
/// </summary>
[Parameter]
string Name => ValueInjectionUtility.TryGetValue(() => Name) ?? $"{Solution.Name}.Example";

AbsolutePath ExampleDirectory => GetExampleDirectory(GetExampleProject());
public Project GetExampleProject() => Solution.GetOtherProject(Name);
public AbsolutePath GetExampleDirectory(Project project) => project.Directory / "bin" / Folder;
}
}
2 changes: 1 addition & 1 deletion ricaun.Nuke/ricaun.Nuke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<PackageId>ricaun.Nuke</PackageId>
<Version>0.0.8</Version>
<Version>0.0.9</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit f1c7f3d

Please sign in to comment.