Skip to content

Commit

Permalink
Merge pull request #11 from ricaun-io/develop
Browse files Browse the repository at this point in the history
Update to 0.0.9
  • Loading branch information
ricaun authored Dec 21, 2021
2 parents a9cf738 + 531c2d2 commit 6475c19
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
24 changes: 13 additions & 11 deletions Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ class Build : NukeBuild, IPublishPack, ICompileExample, IRevitPackageBuilder
{
private const string RevitProjectName = "RevitAddin.PackageBuilder.Example";
string IHazPackageBuilderProject.Name => RevitProjectName;
bool IHazPackageBuilderProject.ReleasePackageBuilder => true;
string IHazPackageBuilder.Application => "Revit.App";
string IHazExample.Name => RevitProjectName;
bool IHazExample.ReleaseExample => false;
public static int Main() => Execute<Build>(x => x.From<IPublishPack>().Build);
}

/*
// Create RevitProjectName
[CheckBuildProjectConfigurations]
class Build : NukeBuild, IPublishRevit
{
private const string RevitProjectName = "RevitAddin.PackageBuilder.Example";
string IHazMainProject.MainName => RevitProjectName;
string IHazPackageBuilder.Application => "Revit.App";
public static int Main() => Execute<Build>(x => x.From<IPublishRevit>().Build);
}
*/
/// <summary>
/// Create RevitProjectName
/// </summary>
//[CheckBuildProjectConfigurations]
//class Build : NukeBuild, IPublishRevit
//{
// private const string RevitProjectName = "RevitAddin.PackageBuilder.Example";
// string IHazMainProject.MainName => RevitProjectName;
// string IHazPackageBuilder.Application => "Revit.App";
// public static int Main() => Execute<Build>(x => x.From<IPublishRevit>().Build);
//}
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).

## [0.0.9] / 2021-12-21
- Add ReleasePackageBuilder

## [0.0.8] / 2021-12-21
- Test and Release
- Update `RevitAddin.PackageBuilder.Example` to version *.0.2
Expand Down Expand Up @@ -54,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- First Release

[vNext]: https://github.com/ricaun-io/ricaun.Nuke/compare/1.0.0...HEAD
[0.0.9]: https://github.com/ricaun-io/ricaun.Nuke/compare/0.0.8...0.0.9
[0.0.8]: https://github.com/ricaun-io/ricaun.Nuke/compare/0.0.7...0.0.8
[0.0.7]: https://github.com/ricaun-io/ricaun.Nuke/compare/0.0.6...0.0.7
[0.0.6]: https://github.com/ricaun-io/ricaun.Nuke/compare/0.0.5...0.0.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public interface IHazPackageBuilderProject : IHazMainProject, IHazSolution, INuk
[Parameter]
string Name => ValueInjectionUtility.TryGetValue(() => Name) ?? MainName;

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

/// <summary>
/// GetPackageBuilderProject
/// </summary>
Expand Down
12 changes: 10 additions & 2 deletions ricaun.Nuke.PackageBuilder/Components/IRevitPackageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Nuke.Common.Tools.InnoSetup;
using Nuke.Common.Utilities.Collections;
using ricaun.Nuke.Extensions;
using System.IO;

namespace ricaun.Nuke.Components
{
Expand All @@ -21,14 +22,15 @@ public interface IRevitPackageBuilder : IHazPackageBuilderProject, IHazInstallat
.Before(Release)
.Executes(() =>
{
CreatePackageBuilder(GetPackageBuilderProject());
CreatePackageBuilder(GetPackageBuilderProject(), ReleasePackageBuilder);
});

/// <summary>
/// CreatePackageBuilder
/// </summary>
/// <param name="project"></param>
public void CreatePackageBuilder(Project project)
/// <param name="releasePackageBuilder"></param>
public void CreatePackageBuilder(Project project, bool releasePackageBuilder = false)
{
var fileName = $"{project.Name}";
var bundleName = $"{fileName}.bundle";
Expand Down Expand Up @@ -74,6 +76,12 @@ public void CreatePackageBuilder(Project project)
PathConstruction.GlobFiles(outputInno, "**/*.zip")
.ForEach(file => FileSystemTasks.CopyFileToDirectory(file, ReleaseDirectory));
}

if (releasePackageBuilder)
{
var folder = Path.GetFileName(PackageBuilderDirectory);
ZipExtension.CreateFromDirectory(PackageBuilderDirectory, ReleaseDirectory / $"{project.Name} {folder}.zip");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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

<PropertyGroup>
Expand Down

0 comments on commit 6475c19

Please sign in to comment.