Skip to content

Commit

Permalink
Decrease build number to work against increment behavior in gitversio…
Browse files Browse the repository at this point in the history
…n that can't be turned off
  • Loading branch information
Lolle2000la committed Feb 28, 2020
1 parent dd6ddad commit a257e50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ImageSort.WindowsUpdater/GitHubUpdateFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Semver;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
Expand Down Expand Up @@ -42,6 +43,8 @@ public GitHubUpdateFetcher(GitHubClient client)

var releaseVersion = SemVersion.Parse(release.TagName.Substring(firstIndexOfV + 1));

if (int.TryParse(releaseVersion.Build, out int build)) releaseVersion = releaseVersion.Change(build: (build - 1).ToString(CultureInfo.InvariantCulture.NumberFormat));

var isNewVersion = version.CompareTo(releaseVersion) < 0;

return prereleaseCondition && isNewVersion;
Expand Down

0 comments on commit a257e50

Please sign in to comment.