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); + } + } }