Use CLI arg instead of booleans in source
MODIFY
WalletWasabi.Packager/ArgsProcessor.cs
WalletWasabi.Packager/ArgsProcessor.cs
@@ -16,10 +16,14 @@ public class ArgsProcessor
/// <summary>Builds Wasabi Wallet binaries for supported platforms to be compared then with the official binaries, and terminates.</summary>
/// <seealso href="https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi.Documentation/Guides/DeterministicBuildGuide.md"/>
- public bool IsOnlyBinariesMode() => IsOneOf("onlybinaries");
+ public bool IsOnlyBinariesMode() => IsOneOf("onlybinaries") || Args is null || Args.Length == 0;
public bool IsContinuousDeliveryMode() => IsOneOf("cdelivery");
+ public bool IsPublish() => IsOneOf("publish");
+
+ public bool IsSign() => IsOneOf("sign");
+
private bool IsOneOf(params string[] values)
{
foreach (var value in values)

MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -24,10 +24,6 @@ namespace WalletWasabi.Packager;
/// </summary>
public static class Program
{
- public const bool DoPublish = false;
- public const bool DoSign = true;
- public const bool DoRestoreProgramCs = false;
-
public const string PfxPath = "C:\\digicert.pfx";
public const string ExecutableName = Constants.ExecutableName;
@@ -74,7 +70,7 @@ public static class Program
ReportStatus();
- if (DoPublish || OnlyBinaries)
+ if (argsProcessor.IsPublish() || OnlyBinaries)
{
await PublishAsync().ConfigureAwait(false);
@@ -84,15 +80,10 @@ public static class Program
#pragma warning disable CS0162 // Unreachable code detected
if (!OnlyBinaries)
{
- if (DoSign)
+ if (argsProcessor.IsSign())
{
await SignAsync().ConfigureAwait(false);
}
-
- if (DoRestoreProgramCs)
- {
- RestoreProgramCs();
- }
}
#pragma warning restore CS0162 // Unreachable code detected
}
@@ -122,11 +113,6 @@ public static class Program
Console.WriteLine();
}
- private static void RestoreProgramCs()
- {
- StartProcessAndWaitForExit("git", PackagerProjectDirectory, arguments: "checkout -- Program.cs");
- }
-
private static async Task SignAsync()
{
foreach (string target in Targets)

Use CLI arg instead of booleans in source