diff --git a/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs b/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs index 5a43e26..6bc52fa 100644 --- a/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs +++ b/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs @@ -225,9 +225,15 @@ private static bool PlatformVersionChanged modulesDirs = Directory.EnumerateDirectories(discoveryPath).ToList(); } var symlinks = modulesDirs.Where(m => new DirectoryInfo(m).LinkTarget != null).ToList(); - CompressionExtensions.TarGZipTo(RootDirectory, BackupFile, filter: f => !f.ToFileInfo().FullName.StartsWith(RootDirectory / ".nuke") && !symlinks.Exists(s => f.ToFileInfo().FullName.StartsWith(s))); + CompressionExtensions.TarGZipTo(RootDirectory, BackupFile, filter: f => !SkipFile(f.ToFileInfo()) && !symlinks.Exists(s => f.ToFileInfo().FullName.StartsWith(s))); }); + private static bool SkipFile(FileInfo fileInfo) + { + const string nodeModules = "node_modules"; + return fileInfo.FullName.StartsWith(RootDirectory / ".nuke") || fileInfo.FullName.Contains(nodeModules); + } + public bool ThereAreFailedTargets => FailedTargets.Count > 0 && SucceededTargets.Contains(Backup); public Target Rollback => _ => _ .DependsOn(Backup)