From 24787b576b665df2c2a9324312f1b58c920c7c6f Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Mon, 23 Sep 2024 20:46:31 +0900 Subject: [PATCH] App cast gen - See if OS is same when checking version --- src/NetSparkle.Tools.AppCastGenerator/JsonAppCastMaker.cs | 2 +- .../NetSparkle.Tools.AppCastGenerator.csproj | 6 +++--- src/NetSparkle.Tools.AppCastGenerator/XMLAppCastMaker.cs | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/NetSparkle.Tools.AppCastGenerator/JsonAppCastMaker.cs b/src/NetSparkle.Tools.AppCastGenerator/JsonAppCastMaker.cs index 7c42a442..df29d3e1 100644 --- a/src/NetSparkle.Tools.AppCastGenerator/JsonAppCastMaker.cs +++ b/src/NetSparkle.Tools.AppCastGenerator/JsonAppCastMaker.cs @@ -59,7 +59,7 @@ public override (List, string?) GetItemsAndProductNameFromExistingA { Console.WriteLine("Found an item in the app cast: version {0} (short version = {1}; title = {3}) -- os = {2}", currentItem.Version, currentItem.ShortVersion, currentItem.OperatingSystem, currentItem.Title); - var itemFound = items.Where(x => x.Version != null && x.Version == currentItem.Version?.Trim()).FirstOrDefault(); + var itemFound = items.Where(x => x.Version != null && x.Version == currentItem.Version?.Trim() && x.OperatingSystem == currentItem.OperatingSystem?.Trim()).FirstOrDefault(); if (itemFound == null) { items.Add(currentItem); diff --git a/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj b/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj index 2ba05009..84cbca61 100644 --- a/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj +++ b/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj @@ -48,10 +48,10 @@ - 2.8.0.0 - 2.8.0.0 + 2.8.1.0 + 2.8.1.0 NetSparkleUpdater.Tools.AppCastGenerator - 2.8.0 + 2.8.1 Deadpikle README.md MIT diff --git a/src/NetSparkle.Tools.AppCastGenerator/XMLAppCastMaker.cs b/src/NetSparkle.Tools.AppCastGenerator/XMLAppCastMaker.cs index a479842f..c252bd77 100644 --- a/src/NetSparkle.Tools.AppCastGenerator/XMLAppCastMaker.cs +++ b/src/NetSparkle.Tools.AppCastGenerator/XMLAppCastMaker.cs @@ -71,7 +71,8 @@ public override (List, string?) GetItemsAndProductNameFromExistingA var currentItem = xmlGenerator.ReadAppCastItem(item); Console.WriteLine("Found an item in the app cast: version {0} ({1}) -- os = {2}", currentItem.Version, currentItem.ShortVersion, currentItem.OperatingSystem); - var itemFound = items.Where(x => x.Version != null && x.Version == currentItem.Version?.Trim()).FirstOrDefault(); + var itemFound = items.Where(x => x.Version != null && x.Version == currentItem.Version?.Trim() + && x.OperatingSystem == currentItem.OperatingSystem?.Trim()).FirstOrDefault(); if (itemFound == null) { items.Add(currentItem);