From d1969f01dc1d1e70e5bf8251cd29140d1ce198a2 Mon Sep 17 00:00:00 2001 From: vc-ci Date: Mon, 7 Oct 2024 05:38:40 +0000 Subject: [PATCH 1/2] 3.806.0 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6a2ab4c..d07ad69 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,7 +6,7 @@ Copyright © VirtoCommerce 2011-2022 - 3.805.0 + 3.806.0 $(VersionSuffix)-$(BuildNumber) From 3a78045e924bca1d5881bfac5119b0e8108f0769 Mon Sep 17 00:00:00 2001 From: Alexander Morogov <42555001+krankenbro@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:03:19 +0200 Subject: [PATCH 2/2] VCI-935: Filter out prereleases when looking for latest platform release (#151) --- .../PlatformTools/Build.PackageManager.cs | 2 +- src/VirtoCommerce.Build/PlatformTools/GithubManager.cs | 7 ++++--- .../PlatformTools/Modules/ExtModuleCatalog.cs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs b/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs index 8926a7f..cb31650 100644 --- a/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs +++ b/src/VirtoCommerce.Build/PlatformTools/Build.PackageManager.cs @@ -537,7 +537,7 @@ private static ManifestModuleInfo LoadModuleInfo(ModuleItem module, ManifestModu PackageManager.ToFile(packageManifest, PackageManifestPath); if (PlatformVersion.CurrentVersion == null) { - var platformRelease = await GithubManager.GetPlatformRelease(null); + var platformRelease = await GithubManager.GetPlatformRelease(); PlatformVersion.CurrentVersion = SemanticVersion.Parse(platformRelease.TagName); } localModulesCatalog.Reload(); diff --git a/src/VirtoCommerce.Build/PlatformTools/GithubManager.cs b/src/VirtoCommerce.Build/PlatformTools/GithubManager.cs index 2b0ba4c..b188d81 100644 --- a/src/VirtoCommerce.Build/PlatformTools/GithubManager.cs +++ b/src/VirtoCommerce.Build/PlatformTools/GithubManager.cs @@ -12,7 +12,7 @@ internal static class GithubManager private static readonly string _platformRepo = "vc-platform"; private static readonly GitHubClient _client = new GitHubClient(new ProductHeaderValue("vc-build")); - public static Task GetPlatformRelease(string releaseTag) + public static Task GetPlatformRelease(string releaseTag = null) { return string.IsNullOrEmpty(releaseTag) ? GetLatestReleaseAsync(_githubUser, _platformRepo) @@ -37,11 +37,12 @@ private static async Task GetLatestReleaseAsync(string repoUser, string { var releases = await _client.Repository.Release.GetAll(repoUser, repoName, new ApiOptions { - PageSize = 5, + PageSize = 50, PageCount = 1, + }); - var release = releases.OrderByDescending(r => new Version(r.TagName.Trim())).FirstOrDefault(); + var release = releases.Where(r => !r.Prerelease).OrderByDescending(r => new Version(r.TagName.Trim())).FirstOrDefault(); return release; } diff --git a/src/VirtoCommerce.Build/PlatformTools/Modules/ExtModuleCatalog.cs b/src/VirtoCommerce.Build/PlatformTools/Modules/ExtModuleCatalog.cs index 7016f75..511d93a 100644 --- a/src/VirtoCommerce.Build/PlatformTools/Modules/ExtModuleCatalog.cs +++ b/src/VirtoCommerce.Build/PlatformTools/Modules/ExtModuleCatalog.cs @@ -25,7 +25,7 @@ public static async Task GetCatalog(IOptions();