Skip to content

Commit

Permalink
Update NUKE
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl committed Nov 5, 2024
1 parent 8069f0d commit 8543e4d
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 125 deletions.
218 changes: 104 additions & 114 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,77 +1,116 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"properties": {
"CodeSigningCertificateKeyVaultBaseUrl": {
"type": "string"
},
"CodeSigningCertificateName": {
"type": "string"
},
"CodeSigningKeyVaultTenantId": {
"type": "string"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"DocuApiKey": {
"type": "string"
},
"DocuBaseUrl": {
"type": "string"
},
"ExecutablesToSignFolder": {
"type": "string"
},
"GitHubAuthenticationToken": {
"type": "string"
},
"KeyVaultClientId": {
"type": "string"
},
"KeyVaultClientSecret": {
"type": "string"
},
"MigrationName": {
"type": "string"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
},
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"BuildDocFxMetadata",
"BuildDocumentation",
"BuildElectronApp",
"BuildFrontend",
"BuildFrontendSwaggerClient",
"BuildRevitPlugin",
"Clean",
"Compile",
"CreateMigration",
"FrontEndRestore",
"GenerateFrontendVersion",
"PublishGitHubRelease",
"Restore",
"SignExecutables",
"Tests",
"UploadDocumentation",
"UploadElectronApp",
"UploadRevitPlugin"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"CodeSigningCertificateKeyVaultBaseUrl": {
"type": "string"
},
"CodeSigningCertificateName": {
"type": "string"
},
"CodeSigningKeyVaultTenantId": {
"type": "string"
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"DocuApiKey": {
"type": "string"
},
"DocuBaseUrl": {
"type": "string"
},
"ExecutablesToSignFolder": {
"type": "string"
},
"GitHubAuthenticationToken": {
"type": "string"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"KeyVaultClientId": {
"type": "string"
},
"KeyVaultClientSecret": {
"type": "string"
},
"MigrationName": {
"type": "string"
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
Expand Down Expand Up @@ -100,71 +139,22 @@
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"BuildDocFxMetadata",
"BuildDocumentation",
"BuildElectronApp",
"BuildFrontend",
"BuildFrontendSwaggerClient",
"BuildRevitPlugin",
"Clean",
"Compile",
"CreateMigration",
"FrontEndRestore",
"GenerateFrontendVersion",
"PublishGitHubRelease",
"Restore",
"SignExecutables",
"Tests",
"UploadDocumentation",
"UploadElectronApp",
"UploadRevitPlugin"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"BuildDocFxMetadata",
"BuildDocumentation",
"BuildElectronApp",
"BuildFrontend",
"BuildFrontendSwaggerClient",
"BuildRevitPlugin",
"Clean",
"Compile",
"CreateMigration",
"FrontEndRestore",
"GenerateFrontendVersion",
"PublishGitHubRelease",
"Restore",
"SignExecutables",
"Tests",
"UploadDocumentation",
"UploadElectronApp",
"UploadRevitPlugin"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
"$ref": "#/definitions/Verbosity"
}
}
}
}
},
"$ref": "#/definitions/NukeBuild"
}
14 changes: 6 additions & 8 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,9 @@ public static class FileVersionProvider
.DependsOn(BuildElectronApp)
.Executes(() =>
{

CopyDirectoryRecursively(SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser",
SourceDirectory / "IPA.Bcfier.Revit" / "Resources" / "Browser",
DirectoryExistsPolicy.Merge,
FileExistsPolicy.Overwrite);
(SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser")
.Copy(SourceDirectory / "IPA.Bcfier.Revit" / "Resources" / "Browser",
ExistsPolicy.MergeAndOverwrite);
var revitPluginOutputDirectory = OutputDirectory / "RevitPlugin";
var navisworksPluginOutputDirectory = OutputDirectory / "NavisworksPlugin";

Expand Down Expand Up @@ -306,7 +304,7 @@ public static class FileVersionProvider
using var zipStream = File.OpenRead(OutputDirectory / "electron" / "IPA.Bcfier_Unzipped_Windows_X64.zip");
ZipFile.ExtractToDirectory(zipStream, installerDirectory / "bcfier-app");

CopyDirectoryRecursively(SourceDirectory / "IPA.Bcfier.Revit" / "InstallerAssets", installerDirectory / "InstallerAssets", DirectoryExistsPolicy.Merge, FileExistsPolicy.Overwrite);
(SourceDirectory / "IPA.Bcfier.Revit" / "InstallerAssets").Copy(installerDirectory / "InstallerAssets", ExistsPolicy.MergeAndOverwrite);
foreach (var configuration in configurations)
{
(installerDirectory / configuration).CreateOrCleanDirectory();
Expand Down Expand Up @@ -354,7 +352,7 @@ public static class FileVersionProvider
.DependsOn(Compile)
.Executes(() =>
{
CopyDirectoryRecursively(SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser", SourceDirectory / "IPA.Bcfier.App" / "wwwroot" / "dist" / "en", DirectoryExistsPolicy.Merge, FileExistsPolicy.Overwrite);
(SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser").Copy(SourceDirectory / "IPA.Bcfier.App" / "wwwroot" / "dist" / "en", ExistsPolicy.MergeAndOverwrite);

// To ensure the tool is always up to date
DotNet("tool update ElectronNET.CLI -g");
Expand Down Expand Up @@ -425,7 +423,7 @@ private void BuildElectronAppInternal(params string[][] electronOptions)
);

var exeFile = (SourceDirectory / "IPA.Bcfier.App" / "bin" / "Desktop").GlobFiles("IPA.Bcfier*.exe").Single();
MoveFile(exeFile, OutputDirectory / "electron" / $"IPA.Bcfier.Setup_{releaseIdentifier}.exe");
exeFile.Move(OutputDirectory / "electron" / $"IPA.Bcfier.Setup_{releaseIdentifier}.exe");

var unpackedDir = (SourceDirectory / "IPA.Bcfier.App" / "bin" / "Desktop").GlobDirectories("*unpacked").Single();
(SourceDirectory / "IPA.Bcfier.App" / "bin" / "Desktop").GlobFiles("**/*.pdb").ForEach(f => f.DeleteFile());
Expand Down
6 changes: 3 additions & 3 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.GitHub" Version="5.0.1" />
<PackageReference Include="Nuke.WebDocu" Version="5.0.1" />
<PackageReference Include="Nuke.GitHub" Version="6.0.0" />
<PackageReference Include="Nuke.WebDocu" Version="6.0.0" />
<PackageDownload Include="GitVersion.CommandLine" Version="[5.12.0]" />
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="Nuke.Common" Version="8.1.3" />
<PackageReference Include="NSwag.CodeGeneration.TypeScript" Version="14.0.7" />
<PackageReference Include="NSwag.MSBuild" Version="14.0.3">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 8543e4d

Please sign in to comment.