From 5b87c7cb4431a809a8260b79d6bc7d4feca10f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sun, 4 Sep 2016 18:05:22 +0200 Subject: [PATCH] Zip program binaries --- build.cake | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/build.cake b/build.cake index f7f3733..5c66df4 100644 --- a/build.cake +++ b/build.cake @@ -108,6 +108,16 @@ var buildDirs = GetDirectories("./tests/**/bin/" + dirSuffix) + GetDirectories("./tests/**/obj/" + dirSuffix); +var fileZipSuffix = isPlatformAnyCPU ? configuration + "-" + version + ".zip" : platform + "-" + configuration + "-" + version + ".zip"; + +var zipSourceAvaloniaDirs = (DirectoryPath)Directory("./src/SimpleWavSplitter.Avalonia/bin/" + dirSuffix); +var zipSourceWpfDirs = (DirectoryPath)Directory("./src/SimpleWavSplitter.Wpf/bin/" + dirSuffix); +var zipSourceConsoleDirs = (DirectoryPath)Directory("./src/SimpleWavSplitter.Console/bin/" + dirSuffix); + +var zipTargetAvaloniaDirs = zipRoot.CombineWithFilePath("SimpleWavSplitter.Avalonia-" + fileZipSuffix); +var zipTargetWpfDirs = zipRoot.CombineWithFilePath("SimpleWavSplitter.Wpf-" + fileZipSuffix); +var zipTargetConsoleDirs = zipRoot.CombineWithFilePath("SimpleWavSplitter.Console-" + fileZipSuffix); + /////////////////////////////////////////////////////////////////////////////// // NUGET NUSPECS /////////////////////////////////////////////////////////////////////////////// @@ -288,6 +298,24 @@ Task("Zip-Files") .Does(() => { Zip(docsSiteRoot, zipDocsSiteArtifacts); + + Zip(zipSourceAvaloniaDirs, + zipTargetAvaloniaDirs, + GetFiles(zipSourceAvaloniaDirs.FullPath + "/*.dll") + + GetFiles(zipSourceAvaloniaDirs.FullPath + "/*.exe")); + + if (isRunningOnWindows) + { + Zip(zipSourceWpfDirs, + zipTargetWpfDirs, + GetFiles(zipSourceWpfDirs.FullPath + "/*.dll") + + GetFiles(zipSourceWpfDirs.FullPath + "/*.exe")); + } + + Zip(zipSourceConsoleDirs, + zipTargetConsoleDirs, + GetFiles(zipSourceConsoleDirs.FullPath + "/*.dll") + + GetFiles(zipSourceConsoleDirs.FullPath + "/*.exe")); }); Task("Create-NuGet-Packages")