Skip to content

Fix --version and new version update announcements #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,10 @@
<ItemGroup>
<Using Include="System.Threading.CancellationToken" Alias="Cancel" />
</ItemGroup>
<!-- MinVer Configuration -->
<PropertyGroup>
<MinVerDefaultPreReleaseIdentifiers>canary.0</MinVerDefaultPreReleaseIdentifiers>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<GlobalPackageVersion Include="MinVer" Version="6.0.0" PrivateAssets="All" />
<GlobalPackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
</ItemGroup>
<!-- AWS -->
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions docs-builder.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{94AC66E5-3
build.sh = build.sh
dotnet-tools.json = dotnet-tools.json
global.json = global.json
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE6011CC-1200-4957-B01F-FCCA10C5CF5A}"
Expand Down
3 changes: 2 additions & 1 deletion src/docs-builder/Cli/CheckForUpdatesFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ private static void CompareWithAssemblyVersion(Uri latestVersionUrl)
.FirstOrDefault()?.InformationalVersion;
if (SemVersion.TryParse(assemblyVersion ?? "", out var currentSemVersion))
{
if (latestVersion <= currentSemVersion)
var currentVersion = new SemVersion(currentSemVersion.Major, currentSemVersion.Minor, currentSemVersion.Patch);
if (latestVersion <= currentVersion)
return;
ConsoleApp.Log("");
ConsoleApp.Log($"A new version of docs-builder is available: {latestVersion} currently on version {currentSemVersion}");
Expand Down
Loading