mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 10:01:10 +00:00
- embeds the append-only historical and deny trust lists in the API and marks matching bundled plugins as Official without blocking loading - builds and records the current plugin manifest only for official release builds - deploys the PDF native libraries for the supported Linux, macOS and Windows runtimes from the plugin dependency manifest - records release hashes by appending only missing entries to master's manifest and rejects any diff that removes a line - documents the release flow, the supported runtimes and the plugin installer limits
29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
#region ========================================================================= USING =====================================================================================
|
|
using Nemera.Presentation.Api;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
#endregion
|
|
|
|
namespace Nemera.Presentation.Api.IntegrationTests.Common.Setup;
|
|
|
|
/// <summary>
|
|
/// Determines whether the API assembly was produced by an official release build.
|
|
/// </summary>
|
|
[ExcludeFromCodeCoverage]
|
|
public static class OfficialReleaseBuildDetector
|
|
{
|
|
/// <summary>
|
|
/// Determines whether the API assembly was produced by an official release build.
|
|
/// </summary>
|
|
/// <returns><see langword="true"/> when the assembly carries the official release marker, <see langword="false"/> otherwise.</returns>
|
|
public static bool IsOfficialReleaseBuild()
|
|
{
|
|
// The marker is injected by OfficialReleaseBuildAssemblyInfo.cs when the official build defines OFFICIAL_RELEASE_BUILD.
|
|
// The tests inspect Program's assembly rather than their own, because the test assembly is not the shipped API assembly.
|
|
return typeof(Program).Assembly
|
|
.GetCustomAttributes<AssemblyMetadataAttribute>()
|
|
.Any(attribute => attribute.Key == "OfficialReleaseBuild" && attribute.Value == "true");
|
|
}
|
|
}
|