Skip to content

Commit

Permalink
Merge branch 'release/3.806.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Oct 29, 2024
2 parents 7dcf6e4 + 3a78045 commit a54ce49
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Copyright>Copyright © VirtoCommerce 2011-2022</Copyright>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>3.805.0</VersionPrefix>
<VersionPrefix>3.806.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 4 additions & 3 deletions src/VirtoCommerce.Build/PlatformTools/GithubManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Release> GetPlatformRelease(string releaseTag)
public static Task<Release> GetPlatformRelease(string releaseTag = null)
{
return string.IsNullOrEmpty(releaseTag)
? GetLatestReleaseAsync(_githubUser, _platformRepo)
Expand All @@ -37,11 +37,12 @@ private static async Task<Release> 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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static async Task<ExternalModuleCatalog> GetCatalog(IOptions<ExternalModu
{
if (_catalog == null)
{
var platformRelease = await GithubManager.GetPlatformRelease(null);
var platformRelease = await GithubManager.GetPlatformRelease();
PlatformVersion.CurrentVersion = SemanticVersion.Parse(platformRelease.TagName); // workaround to see all modules in the external catalog
var client = new ExternalModulesClient(options);
var logger = new LoggerFactory().CreateLogger<ExternalModuleCatalog>();
Expand Down

0 comments on commit a54ce49

Please sign in to comment.