Publish binaries in zip format
MODIFY
WalletWasabi.Packager/ArgsProcessor.cs
WalletWasabi.Packager/ArgsProcessor.cs
@@ -22,6 +22,8 @@ namespace WalletWasabi.Packager
public bool IsGetOnionsMode() => IsOneOf("getonions", "getonion");
+ public bool IsContinuousDeliveryMode() => IsOneOf("cdelivery");
+
private bool IsOneOf(params string[] values)
{
foreach (var value in values)

MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -51,6 +51,7 @@ namespace WalletWasabi.Packager
public static bool OnlyBinaries;
public static bool OnlyCreateDigests;
+ public static bool IsContinuousDelivery;
/// <summary>
/// Main entry point.
@@ -101,6 +102,9 @@ namespace WalletWasabi.Packager
// Only binaries mode is for deterministic builds.
OnlyBinaries = argsProcessor.IsOnlyBinariesMode();
+
+ IsContinuousDelivery = argsProcessor.IsContinuousDeliveryMode();
+
ReportStatus();
if (DoPublish || OnlyBinaries)
@@ -306,6 +310,8 @@ namespace WalletWasabi.Packager
Console.WriteLine($"Deleted {libraryBinReleaseDirectory}");
}
+ var deterministicFilenameTag = IsContinuousDelivery ? $"{DateTimeOffset.UtcNow:ddMMyyyy}" : VersionPrefix;
+
foreach (string target in Targets)
{
string publishedFolder = Path.Combine(BinDistDirectory, target);
@@ -458,6 +464,13 @@ namespace WalletWasabi.Packager
{
continue; // In Windows build at this moment it does not matter though.
}
+
+ ZipFile.CreateFromDirectory(currentBinDistDirectory, Path.Combine(BinDistDirectory, $"Wasabi-{deterministicFilenameTag}-{target}.zip"));
+
+ if (IsContinuousDelivery)
+ {
+ continue;
+ }
}
else if (target.StartsWith("osx"))
{
@@ -467,6 +480,13 @@ namespace WalletWasabi.Packager
continue;
}
+ ZipFile.CreateFromDirectory(currentBinDistDirectory, Path.Combine(BinDistDirectory, $"Wasabi-{deterministicFilenameTag}-{target}.zip"));
+
+ if (IsContinuousDelivery)
+ {
+ continue;
+ }
+
ZipFile.CreateFromDirectory(currentBinDistDirectory, Path.Combine(BinDistDirectory, $"Wasabi-osx-{VersionPrefix}.zip"));
IoHelpers.TryDeleteDirectoryAsync(currentBinDistDirectory).GetAwaiter().GetResult();
@@ -480,6 +500,13 @@ namespace WalletWasabi.Packager
continue;
}
+ ZipFile.CreateFromDirectory(currentBinDistDirectory, Path.Combine(BinDistDirectory, $"Wasabi-{deterministicFilenameTag}-{target}.zip"));
+
+ if (IsContinuousDelivery)
+ {
+ continue;
+ }
+
Console.WriteLine("Create Linux .tar.gz");
if (!Directory.Exists(publishedFolder))
{

Publish binaries in zip format