/// <summary> /// Gets a value indicating whether the user wants SemVer v1 compliance yet specified a non-v1 compliant prerelease tag. /// </summary> private static bool IsMisconfiguredPrereleaseAndSemVer1(VersionOracle oracle) { Requires.NotNull(oracle, nameof(oracle)); return(oracle.VersionOptions?.NuGetPackageVersion?.SemVer == 1 && oracle.PrereleaseVersion != SemanticVersionExtensions.MakePrereleaseSemVer1Compliant(oracle.PrereleaseVersion, 0)); }
/// <summary> /// Gets the SemVer v1 format without padding or the build metadata. /// </summary> private static string GetSemVer1WithoutPaddingOrBuildMetadata(VersionOracle oracle) { Requires.NotNull(oracle, nameof(oracle)); return($"{oracle.Version.ToStringSafe(3)}{SemanticVersionExtensions.MakePrereleaseSemVer1Compliant(oracle.PrereleaseVersion, 0)}"); }