diff --git a/Build/Build.cs b/Build/Build.cs index ad8e768..76c5658 100644 --- a/Build/Build.cs +++ b/Build/Build.cs @@ -5,6 +5,7 @@ class Build : NukeBuild, IPublishPack, ICompileExample, ITest, IShowGitVersion, IAzureSignTool, IPrePack, ILocalAssetRelease { + public void ReleaseAsset(ReleaseAssets releaseAssets) { } IAssetRelease IHazAssetRelease.AssetRelease => new AssetRelease(); //bool IPack.UnlistNuget => true; bool ITest.TestBuildStopWhenFailed => false; diff --git a/Build/ILocalAssetRelease.cs b/Build/ILocalAssetRelease.cs index f46b7a7..197fcc6 100644 --- a/Build/ILocalAssetRelease.cs +++ b/Build/ILocalAssetRelease.cs @@ -17,7 +17,7 @@ public void ReleaseAsset(ReleaseAssets releaseAssets) } } -public interface ILocalAssetRelease : IClean, ICompile, IHazAssetRelease +public interface ILocalAssetRelease : IClean, ICompile, IHazAssetRelease, IAssetRelease { Target LocalAssetRelease => _ => _ .TriggeredBy(Clean) @@ -30,6 +30,6 @@ public interface ILocalAssetRelease : IClean, ICompile, IHazAssetRelease Version = "0.0.0", Notes = "Release Notes", }; - ReleaseAsset(releaseAssets); + ExecuteReleaseAsset(releaseAssets); }); } diff --git a/CHANGELOG.md b/CHANGELOG.md index c35d0d8..657dd21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Update `AzureSignToolUtils` sign to ignore exception. - Update `AzureSignToolUtils` to ignore if file is already signed. - Update `HasSignature` to use `PathTooLongUtils` to check if file is signed. (Fix: #77) +- Update `ExecuteReleaseAsset` to execute `IHazAssetRelease` and build with `IAssetRelease` ### Example - Add `Resource` and `Resource.pt-BR` to test sign files. ### Tests diff --git a/Directory.Build.props b/Directory.Build.props index a5d5f12..8808b33 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@ - 1.9.0-rc.1 + 1.9.0-rc.2 \ No newline at end of file diff --git a/ricaun.Nuke/Components/IAssetRelease.cs b/ricaun.Nuke/Components/IAssetRelease.cs index dc0499c..bb09f3d 100644 --- a/ricaun.Nuke/Components/IAssetRelease.cs +++ b/ricaun.Nuke/Components/IAssetRelease.cs @@ -50,13 +50,18 @@ public interface IHazAssetRelease /// Releases the specified assets. /// /// The assets to be released. - public void ReleaseAsset(ReleaseAssets releaseAssets) + public void ExecuteReleaseAsset(ReleaseAssets releaseAssets) { if (AssetRelease is IAssetRelease assetRelease) { Serilog.Log.Information($"ReleaseAsset: {assetRelease}"); assetRelease.ReleaseAsset(releaseAssets); } + if (this is IAssetRelease buildAssetRelease) + { + Serilog.Log.Information($"ReleaseAsset: {buildAssetRelease}"); + buildAssetRelease.ReleaseAsset(releaseAssets); + } } } diff --git a/ricaun.Nuke/Components/IGitRelease.cs b/ricaun.Nuke/Components/IGitRelease.cs index e636af6..760158d 100644 --- a/ricaun.Nuke/Components/IGitRelease.cs +++ b/ricaun.Nuke/Components/IGitRelease.cs @@ -86,7 +86,7 @@ void ReleaseGitHubProject(Project project, bool releaseAsPrerelease = false) Prerelease = releaseAsPrerelease }; - ReleaseAsset(releaseAssets); + ExecuteReleaseAsset(releaseAssets); var newRelease = new Octokit.NewRelease(version) {