Skip to content

Commit

Permalink
Merge pull request #47 from ricaun-io/develop
Browse files Browse the repository at this point in the history
Version 1.4.0
  • Loading branch information
ricaun authored Oct 9, 2022
2 parents 8d619bb + 18d3e19 commit a227652
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Build/.nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
"ReleaseBundle": {
"type": "boolean"
},
"ReleaseNameVersion": {
"type": "boolean"
},
"ReleasePackageBuilder": {
"type": "boolean"
},
Expand Down
1 change: 1 addition & 0 deletions Build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Build : NukeBuild, IPublishPack, IRevitPackageBuilder
class Build : NukeBuild, IPublishRevit
{
private const string RevitProjectName = "RevitAddin.PackageBuilder.Example";
bool IHazRelease.ReleaseNameVersion => true;
string IHazMainProject.MainName => RevitProjectName;
string IHazRevitPackageBuilder.Application => "Revit.App";

Expand Down
12 changes: 12 additions & 0 deletions Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@
<ItemGroup>
<ProjectReference Include="..\ricaun.Nuke.PackageBuilder\ricaun.Nuke.PackageBuilder.csproj" />
</ItemGroup>

<!--
<ItemGroup>
<PackageReference Include="GitVersion.CommandLine" Version="*"/>
<PackageReference Include="NuGet.CommandLine" Version="*" />
<PackageReference Include="Nuke.Common" Version="*" />
<Reference Include="ricaun.Nuke">
<HintPath>..\..\ricaun.Nuke\ricaun.Nuke\bin\Release\ricaun.Nuke.dll</HintPath>
</Reference>
</ItemGroup>
-->

</Project>
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ 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.4.0] / 2022-10-09
### Features
- Feature `IHazRelease.ReleaseNameVersion` is disable
### Updated
- Update `ricaun.Nuke` to `1.4.0`

## [1.3.5] / 2022-08-12
### Updated
- Update `ricaun.Nuke` - SignFile `base64`
Expand Down Expand Up @@ -205,6 +211,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- First Release

[vNext]: ../../compare/1.0.0...HEAD
[1.4.0]: ../../compare/1.3.5...1.4.0
[1.3.5]: ../../compare/1.3.4...1.3.5
[1.3.4]: ../../compare/1.3.3...1.3.4
[1.3.3]: ../../compare/1.3.2...1.3.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

<PropertyGroup>
<PackageId>RevitAddin.PackageBuilder.Example</PackageId>
<Version>1.3.5</Version>
<Version>1.4.0</Version>
<ProjectGuid>{d2797a34-4696-490d-a97a-c17afb5f0225}</ProjectGuid>
</PropertyGroup>

Expand Down
26 changes: 15 additions & 11 deletions ricaun.Nuke.PackageBuilder/Components/Revit/IRevitPackageBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,20 @@ public interface IRevitPackageBuilder : IHazRevitPackageBuilder, IHazPackageBuil
/// <param name="releaseBundle"></param>
public void CreatePackageBuilder(Project project, bool releasePackageBuilder = false, bool releaseBundle = false)
{
var fileName = $"{project.Name}";
var bundleName = $"{fileName}.bundle";
var projectName = project.Name;
var projectVersion = project.GetInformationalVersion();

var projectNameVersion = GetReleaseFileNameVersion(projectName, projectVersion);

var bundleName = $"{projectName}.bundle";
var BundleDirectory = PackageBuilderDirectory / bundleName;
var ContentsDirectory = BundleDirectory / "Contents";

if (ProjectNameFolder)
ContentsDirectory = ContentsDirectory / project.Name;
ContentsDirectory = ContentsDirectory / projectName;

if (ProjectVersionFolder)
ContentsDirectory = ContentsDirectory / project.GetInformationalVersion();
ContentsDirectory = ContentsDirectory / projectVersion;

FileSystemTasks.CopyDirectoryRecursively(InputDirectory, ContentsDirectory);

Expand All @@ -71,7 +75,7 @@ public void CreatePackageBuilder(Project project, bool releasePackageBuilder = f
// Deploy File
var outputInno = OutputDirectory;
var packageBuilderDirectory = GetMaxPathFolderOrTempFolder(PackageBuilderDirectory);
var issFiles = PathConstruction.GlobFiles(packageBuilderDirectory, $"*{project.Name}.iss");
var issFiles = PathConstruction.GlobFiles(packageBuilderDirectory, $"*{projectName}.iss");
issFiles.ForEach(file =>
{
InnoSetupTasks.InnoSetup(config => config
Expand All @@ -83,27 +87,27 @@ public void CreatePackageBuilder(Project project, bool releasePackageBuilder = f
// Sign outputInno
SignFolder(outputInno);

// Zip exe Files
var exeFiles = PathConstruction.GlobFiles(outputInno, "**/*.exe");
exeFiles.ForEach(file => ZipExtension.ZipFileCompact(file));
exeFiles.ForEach(file => ZipExtension.ZipFileCompact(file, projectNameVersion));

if (outputInno != ReleaseDirectory)
{
PathConstruction.GlobFiles(outputInno, "**/*.zip")
.ForEach(file => FileSystemTasks.CopyFileToDirectory(file, ReleaseDirectory));
}

var version = project.GetInformationalVersion();

if (releasePackageBuilder)
{
var folder = Path.GetFileName(PackageBuilderDirectory);
ZipExtension.CreateFromDirectory(PackageBuilderDirectory, ReleaseDirectory / $"{project.Name} {version}.{folder}.zip");
var releaseFileName = CreateReleaseFromDirectory(PackageBuilderDirectory, projectName, projectVersion, $".{folder}.zip");
Serilog.Log.Information($"Release: {releaseFileName}");
}

if (releaseBundle)
{
var bundleVersionName = $"{fileName} {version}.bundle";
ZipExtension.CreateFromDirectory(BundleDirectory, ReleaseDirectory / $"{bundleVersionName}.zip", true);
var releaseFileName = CreateReleaseFromDirectory(BundleDirectory, projectName, projectVersion, ".bundle.zip", true);
Serilog.Log.Information($"Release: {releaseFileName}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ public class RevitProjectAddInsBuilder : RevitAddInsBuilder
/// <param name="project"></param>
/// <param name="assemblyFile"></param>
/// <param name="application"></param>
/// <param name="applicationType"></param>
/// <param name="vendorId"></param>
/// <param name="vendorDescription"></param>
public RevitProjectAddInsBuilder(Project project, string assemblyFile, string application, string applicationType, string vendorId, string vendorDescription)
public RevitProjectAddInsBuilder(Project project, string assemblyFile, string application,
string applicationType, string vendorId, string vendorDescription)
{
var addInId = project.GetAppId();
var name = project.Name;
Expand Down
15 changes: 13 additions & 2 deletions ricaun.Nuke.PackageBuilder/ricaun.Nuke.PackageBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PropertyGroup>
<PackageId>ricaun.Nuke.PackageBuilder</PackageId>
<Version>1.3.5</Version>
<Version>1.4.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -58,4 +58,15 @@
<PackageReference Include="ricaun.Nuke" Version="*" />
</ItemGroup>

</Project>
<!--
<ItemGroup>
<PackageReference Include="GitVersion.CommandLine" Version="*"/>
<PackageReference Include="NuGet.CommandLine" Version="*" />
<PackageReference Include="Nuke.Common" Version="*" />
<Reference Include="ricaun.Nuke">
<HintPath>..\..\ricaun.Nuke\ricaun.Nuke\bin\Release\ricaun.Nuke.dll</HintPath>
</Reference>
</ItemGroup>
-->

</Project>

0 comments on commit a227652

Please sign in to comment.