From c2bfcc995e69f3423dace5187fe6d17931098837 Mon Sep 17 00:00:00 2001 From: Markus Koechl Date: Mon, 24 Jul 2023 23:34:04 +0200 Subject: [PATCH 1/2] added _V folder and *.v file exclusion for Vault Folder deployments --- .../VaultFoldersController.cs | 10 ++++++ Thunderdome/Model/DeploymentFolder.cs | 31 ++++++++++++------- Thunderdome/Properties/AssemblyInfo.cs | 4 +-- readme.txt | 1 + 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Thunderdome/DeploymentController/VaultFoldersController.cs b/Thunderdome/DeploymentController/VaultFoldersController.cs index f540183..ec5c8de 100644 --- a/Thunderdome/DeploymentController/VaultFoldersController.cs +++ b/Thunderdome/DeploymentController/VaultFoldersController.cs @@ -82,6 +82,16 @@ public async Task AddFolderAsync(string vaultFolder, stri IO.Directory.CreateDirectory(tmpLocalFolder); var downloadResults = await Util.VaultUtil.DownloadFolderAsync(Connection, folder, true, false, tmpLocalFolder); + + //delete _V folders from temp location; avoid to re-destribute _V folders + string[] _VFolders = IO.Directory.GetDirectories(tmpLocalFolder, "_V", IO.SearchOption.AllDirectories); + if (_VFolders.Length > 0) + { + foreach (string _VFldr in _VFolders) + { + FileUtil.DeleteDirectory(_VFldr, false); + } + } FileUtil.RemoveReadOnly(downloadResults.FileResults.Select(f => f.LocalPath.FullPath)); var configFilePath = IO.Path.Combine(tmpLocalFolder, ConfigNames[0]); diff --git a/Thunderdome/Model/DeploymentFolder.cs b/Thunderdome/Model/DeploymentFolder.cs index 044719b..6e31fa7 100644 --- a/Thunderdome/Model/DeploymentFolder.cs +++ b/Thunderdome/Model/DeploymentFolder.cs @@ -49,23 +49,32 @@ private void ZipFolder(ZipFile zip, string key, string currentPath) foreach (string file in DirectoryUtil.GetFilesOrEmpty(currentPath)) { - string subPath = System.IO.Path.GetDirectoryName(file); - subPath = subPath.Remove(0, Path.Length); - subPath = subPath.Replace('\\', '/'); - subPath = subPath.TrimStart('/'); + if (file.EndsWith(".v")) + { + continue; + } + else + { + string subPath = System.IO.Path.GetDirectoryName(file); + subPath = subPath.Remove(0, Path.Length); + subPath = subPath.Replace('\\', '/'); + subPath = subPath.TrimStart('/'); - string zipPath; + string zipPath; - if (subPath.Length > 0) - zipPath = key + "/" + folderName + "/" + subPath + "/" + System.IO.Path.GetFileName(file); - else - zipPath = key + "/" + folderName + "/" + System.IO.Path.GetFileName(file); + if (subPath.Length > 0) + zipPath = key + "/" + folderName + "/" + subPath + "/" + System.IO.Path.GetFileName(file); + else + zipPath = key + "/" + folderName + "/" + System.IO.Path.GetFileName(file); + + zip.Add(new FileDataSource(file), zipPath); + } - zip.Add(new FileDataSource(file), zipPath); } foreach (string folder in DirectoryUtil.GetDirectoriesOrEmpty(currentPath)) - ZipFolder(zip, key, folder); + if (!folder.Contains("_V")) + ZipFolder(zip, key, folder); } } } \ No newline at end of file diff --git a/Thunderdome/Properties/AssemblyInfo.cs b/Thunderdome/Properties/AssemblyInfo.cs index e1910f3..608f9b4 100644 --- a/Thunderdome/Properties/AssemblyInfo.cs +++ b/Thunderdome/Properties/AssemblyInfo.cs @@ -19,5 +19,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("129EBB30-24B6-4635-AE20-46BF10EF3B12")] -[assembly: AssemblyVersion("2024.0.0.0")] -[assembly: AssemblyFileVersion("2024.0.0.0")] +[assembly: AssemblyVersion("2024.1.0.0")] +[assembly: AssemblyFileVersion("2024.1.0.0")] diff --git a/readme.txt b/readme.txt index 5900afd..cfeaf5a 100644 --- a/readme.txt +++ b/readme.txt @@ -55,6 +55,7 @@ Thunderdome is open source. You are expected to build your individual applicatio RELEASE NOTES: --------------------------------- +2024.1.0: exclude _V folders and *.v files 2024.0.0: updated for 2024 compatibility 2023.0: updated for 2023 2022.1: Support for Saved Searches Groups added; Minor updates on the Tools->Thunderdome Pullout-Menu From e6fff28eae5863ce632b062d6ea5bd6f8105ab6a Mon Sep 17 00:00:00 2001 From: Markus Koechl Date: Wed, 26 Jul 2023 22:48:07 +0200 Subject: [PATCH 2/2] fixed search group deployment --- Deploy/Properties/AssemblyInfo.cs | 4 ++-- .../SavedSearchesController.cs | 15 ++++++++++++++- Thunderdome/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Deploy/Properties/AssemblyInfo.cs b/Deploy/Properties/AssemblyInfo.cs index d118192..20efb18 100644 --- a/Deploy/Properties/AssemblyInfo.cs +++ b/Deploy/Properties/AssemblyInfo.cs @@ -17,5 +17,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("C716965C-8440-4490-A9D8-1A4C2C35D056")] -[assembly: AssemblyVersion("2024.0.0.0")] -[assembly: AssemblyFileVersion("2024.0.0.0")] +[assembly: AssemblyVersion("2024.1.0.1")] +[assembly: AssemblyFileVersion("2024.1.0.1")] diff --git a/Thunderdome/DeploymentController/SavedSearchesController.cs b/Thunderdome/DeploymentController/SavedSearchesController.cs index 1a689dc..77ee3a1 100644 --- a/Thunderdome/DeploymentController/SavedSearchesController.cs +++ b/Thunderdome/DeploymentController/SavedSearchesController.cs @@ -57,15 +57,28 @@ public override void SetMoveOperations(string folder, UtilSettings utilSettings) string serverName = AutodeskPathUtil.GetServerSettingsFolderName(Connection); string localSettingFolder = AutodeskPathUtil.GetCurrentVaultCommonFolder(Connection, serverName, VaultName); string searchesPath = Path.Combine(localSettingFolder, FolderSearches); + string filename = null; foreach (string searchPath in DirectoryUtil.GetFilesOrEmpty(folder)) { - string filename = Path.GetFileName(searchPath); + filename = Path.GetFileName(searchPath); utilSettings.FileMoveOperations.Add(new FileMove { From = searchPath, To = Path.Combine(searchesPath, filename) }); } + //add the group settings file + string searchGroupPath = Path.Combine(localSettingFolder, (FolderSearches + '\\' + SearchesGroups)); + string grpfolder = Path.Combine(folder, "Groups"); + foreach (string searchPath in DirectoryUtil.GetFilesOrEmpty(grpfolder)) + { + filename = Path.GetFileName(searchPath); + utilSettings.FileMoveOperations.Add(new FileMove + { + From = searchPath, + To = Path.Combine(searchGroupPath, filename) + }); + } } catch { diff --git a/Thunderdome/Properties/AssemblyInfo.cs b/Thunderdome/Properties/AssemblyInfo.cs index 608f9b4..a0b180c 100644 --- a/Thunderdome/Properties/AssemblyInfo.cs +++ b/Thunderdome/Properties/AssemblyInfo.cs @@ -19,5 +19,5 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("129EBB30-24B6-4635-AE20-46BF10EF3B12")] -[assembly: AssemblyVersion("2024.1.0.0")] -[assembly: AssemblyFileVersion("2024.1.0.0")] +[assembly: AssemblyVersion("2024.1.0.1")] +[assembly: AssemblyFileVersion("2024.1.0.1")]