Exemple #1
0
        private static (Release?, TagVersion?) GetLatestRelease(IReadOnlyList <Release> releases, bool includePrereleases)
        {
            Release?   latest  = null;
            TagVersion?version = null;

            foreach (var release in releases)
            {
                if (!release.Prerelease || includePrereleases)
                {
                    var v = TagVersion.Parse(release.TagName);

                    if ((version is null) || (v > version))
                    {
                        latest  = release;
                        version = v;
                    }
                }
            }

            return(latest, version);
        }
 public ManualPackageResolver(string updateFile, TagVersion updateVersion)
 => (_updateFile, _updateVersion) = (updateFile, updateVersion);