cli: create VersionHelper

pull/4782/head
Yunus Emre Kalkan 5 years ago
parent e68392ccee
commit 55de0da328

@ -226,7 +226,7 @@ namespace Volo.Abp.Cli.ProjectModification
}
else
{
if (!switchToStable && currentVersion.Split("-").Length > 1)
if (!switchToStable && SemanticVersion.Parse(currentVersion).IsPrerelease)
{
version = await GetLatestVersion(package, true);
}
@ -263,7 +263,7 @@ namespace Volo.Abp.Cli.ProjectModification
var newVersion = includeReleaseCandidates
? versionList.First()
: versionList.FirstOrDefault(v => v.Split("-").Length < 2);
: versionList.FirstOrDefault(v => !SemanticVersion.Parse(v).IsPrerelease);
var newVersionWithPrefix = $"~{newVersion}";

Loading…
Cancel
Save