Skip to content

Commit

Permalink
Merge pull request #25 from ricaun-io/develop
Browse files Browse the repository at this point in the history
- Add ReleaseBundle Option
  • Loading branch information
ricaun authored Mar 8, 2022
2 parents 6a5d5df + a91e092 commit e3b9c85
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

<PropertyGroup>
<PackageId>RevitAddin.PackageBuilder.Example</PackageId>
<Version>$(RevitVersion).1.2</Version>
<Version>$(RevitVersion).1.3</Version>
<ProjectGuid>{d2797a34-4696-490d-a97a-c17afb5f0225}</ProjectGuid>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public interface IHazPackageBuilderProject : IHazMainProject, IHazSolution, INuk
[Parameter]
bool ReleasePackageBuilder => TryGetValue<bool?>(() => ReleasePackageBuilder) ?? false;

/// <summary>
/// ReleaseBundle (default: false)
/// </summary>
[Parameter]
bool ReleaseBundle => TryGetValue<bool?>(() => ReleaseBundle) ?? false;

/// <summary>
/// GetPackageBuilderProject
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ public interface IRevitPackageBuilder : IHazRevitPackageBuilder, IHazPackageBuil
.Before(Release)
.Executes(() =>
{
CreatePackageBuilder(GetPackageBuilderProject(), ReleasePackageBuilder);
CreatePackageBuilder(GetPackageBuilderProject(), ReleasePackageBuilder, ReleaseBundle);
});

/// <summary>
/// CreatePackageBuilder
/// </summary>
/// <param name="project"></param>
/// <param name="releasePackageBuilder"></param>
public void CreatePackageBuilder(Project project, bool releasePackageBuilder = false)
/// <param name="releaseBundle"></param>
public void CreatePackageBuilder(Project project, bool releasePackageBuilder = false, bool releaseBundle = false)
{
var fileName = $"{project.Name}";
var bundleName = $"{fileName}.bundle";
Expand Down Expand Up @@ -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");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<PackageId>ricaun.Nuke.PackageBuilder</PackageId>
<Version>1.1.2</Version>
<Version>1.1.3</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit e3b9c85

Please sign in to comment.