Skip to content

Commit

Permalink
Added: GameBanana Output Mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jan 17, 2022
1 parent cffd8e1 commit b8fa6cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions source/Reloaded.Mod.Loader.Update.Packaging/Publisher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using Sewer56.Update.Packaging;
using Sewer56.Update.Packaging.Enums;
using Sewer56.Update.Packaging.Interfaces;
using Sewer56.Update.Packaging.IO;
using Sewer56.Update.Packaging.Structures;
using Sewer56.Update.Packaging.Structures.ReleaseBuilder;
using Sewer56.Update.Resolvers.GameBanana;
Expand Down Expand Up @@ -72,6 +73,7 @@ public static async Task<ReleaseMetadata> PublishAsync(PublishArgs args)
UseFastCompression = false
});

var compressionScheme = args.PublishTarget == PublishTarget.GameBanana ? JsonCompression.None : JsonCompression.Brotli;
if (args.PublishTarget == PublishTarget.NuGet)
{
archiver = new NuGetPackageArchiver(new NuGetPackageArchiverSettings()
Expand All @@ -98,7 +100,8 @@ public static async Task<ReleaseMetadata> PublishAsync(PublishArgs args)
PackageArchiver = archiver,
PackageExtractor = new SevenZipSharpExtractor(),
AutoGenerateDelta = args.AutomaticDelta,
ReleaseExtraData = extraData
ReleaseExtraData = extraData,
JsonCompressionMode = compressionScheme
}, args.Progress);

// Add GameBanana integration marker on deltas.
Expand Down Expand Up @@ -211,7 +214,12 @@ public enum PublishTarget
/// <summary>
/// Upload package to NuGet.
/// </summary>
NuGet
NuGet,

/// <summary>
/// Upload package to GameBanana.
/// </summary>
GameBanana,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Sewer56.Update.Extractors.SevenZipSharp" Version="1.1.0" GeneratePathProperty="true" />
<PackageReference Include="Sewer56.Update.Packaging" Version="2.0.0" />
<PackageReference Include="Sewer56.Update.Packaging" Version="2.1.0" />
<PackageReference Include="Sewer56.Update.Resolvers.NuGet" Version="1.1.0" />
<PackageReference Include="Sewer56.Update.Resolvers.GameBanana" Version="1.2.0" />
</ItemGroup>
Expand Down

0 comments on commit b8fa6cf

Please sign in to comment.