Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions WalletWasabi.Packager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down Expand Up @@ -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);
}
}
}
Loading