Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Fix to resolve Git Tag sorting issue #300 #307

Merged
merged 2 commits into from
Sep 3, 2019

Conversation

SimonDarksideJ
Copy link
Contributor

XRTK - Mixed Reality Toolkit Change Request

Overview

fix to resolve #300, properly sorts the tag versions returned by Git based on a 3 digit version code. Select the actual latest version based on:

x.x.x version number

Previously, last was determined by the double value parsed value, which is incorrectly sorted by .NET. Now sorts by each individual version identifier to locate the latest.

Target of the change:

Is this enhancement for:

  • Core (core framework, interfaces and definitions)

Changes:

Updates Git Tag version sort to sort by each individual version identifier

…based on a 3 digit version code. Select the actual latest version based on:

x.x.x version number

Previously, last was determined by the double value parsed value, which is incorrectly sorted by .NET.  Now sorts by each individual version identifier to locate the latest.
@SimonDarksideJ SimonDarksideJ added Bug Something isn't working Ready for review PR finished primary development, open for review labels Sep 3, 2019
@SimonDarksideJ SimonDarksideJ self-assigned this Sep 3, 2019
Copy link
Contributor

@StephenHodgson StephenHodgson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -209,7 +209,8 @@ internal static async void ValidatePackages()

private static async Task AddPackageAsync(MixedRealityPackageInfo packageInfo)
{
var tag = (await GitUtilities.GetAllTagsFromRemoteAsync(packageInfo.Uri)).LastOrDefault();
var versionSeperator = new char[] { '.' };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a readonly field in the class so we don't allocate it every time we add a package.

@StephenHodgson StephenHodgson merged commit 3ba9896 into development Sep 3, 2019
@StephenHodgson StephenHodgson deleted the fix/packageversionsort branch September 3, 2019 15:23
XRTK-Build-Bot pushed a commit that referenced this pull request Sep 9, 2019
* fix to resolve #300, properly sorts the tag versions returned by Git based on a 3 digit version code.  Select the actual latest version based on:

x.x.x version number

Previously, last was determined by the double value parsed value, which is incorrectly sorted by .NET.  Now sorts by each individual version identifier to locate the latest.

* Restored missing variable
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Ready for review PR finished primary development, open for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants