diff --git a/build/Build.cs b/build/Build.cs index 557aee2..2184f8c 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -255,9 +255,11 @@ public static class FileVersionProvider .DependsOn(BuildElectronApp) .Executes(() => { - (SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser") - .Copy(SourceDirectory / "IPA.Bcfier.Revit" / "Resources" / "Browser", - ExistsPolicy.MergeAndOverwrite); + + CopyDirectoryRecursively(SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser", + SourceDirectory / "IPA.Bcfier.Revit" / "Resources" / "Browser", + DirectoryExistsPolicy.Merge, + FileExistsPolicy.Overwrite); var revitPluginOutputDirectory = OutputDirectory / "RevitPlugin"; var navisworksPluginOutputDirectory = OutputDirectory / "NavisworksPlugin"; @@ -304,7 +306,7 @@ public static class FileVersionProvider using var zipStream = File.OpenRead(OutputDirectory / "electron" / "IPA.Bcfier_Unzipped_Windows_X64.zip"); ZipFile.ExtractToDirectory(zipStream, installerDirectory / "bcfier-app"); - (SourceDirectory / "IPA.Bcfier.Revit" / "InstallerAssets").Copy(installerDirectory / "InstallerAssets", ExistsPolicy.MergeAndOverwrite); + CopyDirectoryRecursively(SourceDirectory / "IPA.Bcfier.Revit" / "InstallerAssets", installerDirectory / "InstallerAssets", DirectoryExistsPolicy.Merge, FileExistsPolicy.Overwrite); foreach (var configuration in configurations) { (installerDirectory / configuration).CreateOrCleanDirectory(); @@ -352,7 +354,7 @@ public static class FileVersionProvider .DependsOn(Compile) .Executes(() => { - (SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser").Copy(SourceDirectory / "IPA.Bcfier.App" / "wwwroot" / "dist" / "en", ExistsPolicy.MergeAndOverwrite); + CopyDirectoryRecursively(SourceDirectory / "ipa-bcfier-ui" / "dist" / "ipa-bcfier-ui" / "browser", SourceDirectory / "IPA.Bcfier.App" / "wwwroot" / "dist" / "en", DirectoryExistsPolicy.Merge, FileExistsPolicy.Overwrite); // To ensure the tool is always up to date DotNet("tool update ElectronNET.CLI -g"); @@ -423,7 +425,7 @@ private void BuildElectronAppInternal(params string[][] electronOptions) ); var exeFile = (SourceDirectory / "IPA.Bcfier.App" / "bin" / "Desktop").GlobFiles("IPA.Bcfier*.exe").Single(); - exeFile.Move(OutputDirectory / "electron" / $"IPA.Bcfier.Setup_{releaseIdentifier}.exe"); + MoveFile(exeFile, 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()); diff --git a/build/_build.csproj b/build/_build.csproj index 5618f1c..72196b8 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -12,10 +12,10 @@ - - + + - + all