Skip to content

Commit

Permalink
App cast gen - See if OS is same when checking version
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadpikle committed Sep 23, 2024
1 parent 14aca92 commit 24787b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/NetSparkle.Tools.AppCastGenerator/JsonAppCastMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override (List<AppCastItem>, 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent />
<AssemblyVersion>2.8.0.0</AssemblyVersion>
<FileVersion>2.8.0.0</FileVersion>
<AssemblyVersion>2.8.1.0</AssemblyVersion>
<FileVersion>2.8.1.0</FileVersion>
<PackageId>NetSparkleUpdater.Tools.AppCastGenerator</PackageId>
<Version>2.8.0</Version>
<Version>2.8.1</Version>
<Authors>Deadpikle</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
3 changes: 2 additions & 1 deletion src/NetSparkle.Tools.AppCastGenerator/XMLAppCastMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public override (List<AppCastItem>, 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);
Expand Down

0 comments on commit 24787b5

Please sign in to comment.