public void IncreaseVersion(VersionSection versionSection) { if (LatestRemoteVersion != null) { NewVersion = LatestRemoteVersion.IncreaseVersion(versionSection); } }
public static NuGetVersion IncreaseVersion( this NuGetVersion version, VersionSection versionSection = VersionSection.PATCH) { return(versionSection switch { VersionSection.PATCH => new NuGetVersion(version.Major, version.Minor, version.Patch + 1), VersionSection.MINOR => new NuGetVersion(version.Major, version.Minor + 1, 0), VersionSection.MAJOR => new NuGetVersion(version.Major + 1, 0, 0), _ => new NuGetVersion(version.Major, version.Minor, version.Patch + 1) });