From 935195d3ebf3b60ea64aed8c3b9625e280484210 Mon Sep 17 00:00:00 2001 From: luzius1089 Date: Fri, 20 Feb 2026 11:11:23 +0100 Subject: [PATCH] Remove all .gitattributes and .gitignore files from the packages --- WalletWasabi.Packager/Program.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/WalletWasabi.Packager/Program.cs b/WalletWasabi.Packager/Program.cs index fd61f718be..3d4e589296 100644 --- a/WalletWasabi.Packager/Program.cs +++ b/WalletWasabi.Packager/Program.cs @@ -321,6 +321,8 @@ private static async Task PublishAsync() } } + DeleteGitMetadataFiles(currentBinDistDirectory); + // Rename WalletWasabi.Fluent.Desktop(.exe) -> wassabee(.exe). string executableExtension = target.StartsWith("win") ? ".exe" : ""; string oldExecutablePath = Path.Combine(currentBinDistDirectory, $"WalletWasabi.Fluent.Desktop{executableExtension}"); @@ -670,4 +672,32 @@ private static string GetPackageTargetPostfix(string target) return target; } + + private static void DeleteGitMetadataFiles(string rootDir) + { + static void TryDelete(string path) + { + try + { + // Ensure writeable (defensive for Windows attributes). + File.SetAttributes(path, FileAttributes.Normal); + File.Delete(path); + } + catch + { + // Intentionally ignore: best-effort cleanup. + } + } + + foreach (var file in Directory.EnumerateFiles(rootDir, ".gitattributes", SearchOption.AllDirectories)) + { + TryDelete(file); + } + + // Optional: also remove .gitignore (same class of non-functional metadata) + foreach (var file in Directory.EnumerateFiles(rootDir, ".gitignore", SearchOption.AllDirectories)) + { + TryDelete(file); + } + } }