From a91e092225f76dfde25d0cefad8c590eabed67af Mon Sep 17 00:00:00 2001 From: Luiz Henrique Cassettari Date: Tue, 8 Mar 2022 18:41:50 -0300 Subject: [PATCH] - Add ReleaseBundle Option --- Build/Build.cs | 1 + CHANGELOG.md | 4 ++++ .../RevitAddin.PackageBuilder.Example.csproj | 2 +- .../Components/IHazPackageBuilderProject.cs | 6 ++++++ .../Components/Revit/IRevitPackageBuilder.cs | 10 ++++++++-- .../ricaun.Nuke.PackageBuilder.csproj | 2 +- 6 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Build/Build.cs b/Build/Build.cs index f6a3c38..d965366 100644 --- a/Build/Build.cs +++ b/Build/Build.cs @@ -9,6 +9,7 @@ class Build : NukeBuild, IPublishPack, ICompileExample, IRevitPackageBuilder private const string RevitProjectName = "RevitAddin.PackageBuilder.Example"; string IHazPackageBuilderProject.Name => RevitProjectName; bool IHazPackageBuilderProject.ReleasePackageBuilder => true; + bool IHazPackageBuilderProject.ReleaseBundle => true; string IHazRevitPackageBuilder.Application => "Revit.App"; bool IHazRevitPackageBuilder.NewVersions => true; string IHazExample.Name => RevitProjectName; diff --git a/CHANGELOG.md b/CHANGELOG.md index 21abd2f..2df0cdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ 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). +## [1.1.3] / 2022-03-08 +- Add ReleaseBundle Option + ## [1.1.2] / 2022-02-23 - Update Project Example - Update ricaun.Nuke @@ -105,6 +108,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - First Release [vNext]: ../../compare/1.0.0...HEAD +[1.1.3]: ../../compare/1.1.2...1.1.3 [1.1.2]: ../../compare/1.1.1...1.1.2 [1.1.1]: ../../compare/1.1.0...1.1.1 [1.1.0]: ../../compare/1.0.1...1.1.0 diff --git a/RevitAddin.PackageBuilder.Example/RevitAddin.PackageBuilder.Example.csproj b/RevitAddin.PackageBuilder.Example/RevitAddin.PackageBuilder.Example.csproj index bfc6670..73d65d1 100644 --- a/RevitAddin.PackageBuilder.Example/RevitAddin.PackageBuilder.Example.csproj +++ b/RevitAddin.PackageBuilder.Example/RevitAddin.PackageBuilder.Example.csproj @@ -77,7 +77,7 @@ RevitAddin.PackageBuilder.Example - $(RevitVersion).1.2 + $(RevitVersion).1.3 {d2797a34-4696-490d-a97a-c17afb5f0225} diff --git a/ricaun.Nuke.PackageBuilder/Components/IHazPackageBuilderProject.cs b/ricaun.Nuke.PackageBuilder/Components/IHazPackageBuilderProject.cs index 9d7a7c8..80da0d6 100644 --- a/ricaun.Nuke.PackageBuilder/Components/IHazPackageBuilderProject.cs +++ b/ricaun.Nuke.PackageBuilder/Components/IHazPackageBuilderProject.cs @@ -22,6 +22,12 @@ public interface IHazPackageBuilderProject : IHazMainProject, IHazSolution, INuk [Parameter] bool ReleasePackageBuilder => TryGetValue(() => ReleasePackageBuilder) ?? false; + /// + /// ReleaseBundle (default: false) + /// + [Parameter] + bool ReleaseBundle => TryGetValue(() => ReleaseBundle) ?? false; + /// /// GetPackageBuilderProject /// diff --git a/ricaun.Nuke.PackageBuilder/Components/Revit/IRevitPackageBuilder.cs b/ricaun.Nuke.PackageBuilder/Components/Revit/IRevitPackageBuilder.cs index 839777e..daccc70 100644 --- a/ricaun.Nuke.PackageBuilder/Components/Revit/IRevitPackageBuilder.cs +++ b/ricaun.Nuke.PackageBuilder/Components/Revit/IRevitPackageBuilder.cs @@ -22,7 +22,7 @@ public interface IRevitPackageBuilder : IHazRevitPackageBuilder, IHazPackageBuil .Before(Release) .Executes(() => { - CreatePackageBuilder(GetPackageBuilderProject(), ReleasePackageBuilder); + CreatePackageBuilder(GetPackageBuilderProject(), ReleasePackageBuilder, ReleaseBundle); }); /// @@ -30,7 +30,8 @@ public interface IRevitPackageBuilder : IHazRevitPackageBuilder, IHazPackageBuil /// /// /// - public void CreatePackageBuilder(Project project, bool releasePackageBuilder = false) + /// + public void CreatePackageBuilder(Project project, bool releasePackageBuilder = false, bool releaseBundle = false) { var fileName = $"{project.Name}"; var bundleName = $"{fileName}.bundle"; @@ -82,6 +83,11 @@ public void CreatePackageBuilder(Project project, bool releasePackageBuilder = f var folder = Path.GetFileName(PackageBuilderDirectory); ZipExtension.CreateFromDirectory(PackageBuilderDirectory, ReleaseDirectory / $"{project.Name} {folder}.zip"); } + + if (releaseBundle) + { + ZipExtension.CreateFromDirectory(BundleDirectory, ReleaseDirectory / $"{bundleName}.zip"); + } } } } diff --git a/ricaun.Nuke.PackageBuilder/ricaun.Nuke.PackageBuilder.csproj b/ricaun.Nuke.PackageBuilder/ricaun.Nuke.PackageBuilder.csproj index abe7998..5e49b8e 100644 --- a/ricaun.Nuke.PackageBuilder/ricaun.Nuke.PackageBuilder.csproj +++ b/ricaun.Nuke.PackageBuilder/ricaun.Nuke.PackageBuilder.csproj @@ -7,7 +7,7 @@ ricaun.Nuke.PackageBuilder - 1.1.2 + 1.1.3