winsparkle icon indicating copy to clipboard operation
winsparkle copied to clipboard

Order of items seems to hide newest version.

Open Foaly opened this issue 8 months ago • 2 comments

Hi there,

thank you very much for this great and handy library! I am using the current version 0.8.1 and I am observing a weird behaviour where I am not sure if it is intended or if I am doing anything wrong.

Consider the following appcast.xml setup:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Application Release</title>
    <link>https://website.com/downloads/</link>
    <description>The latest stable release.</description>
    <language>en</language>
    <item>
      <title>Version 0.21.1</title>
      <link>https://website.com/downloads/</link>
      <sparkle:version>0.21.1</sparkle:version>
      <pubDate>Tue, 03 Jun 2024 14:38:00 +0000</pubDate>
      <enclosure sparkle:os="windows"
                 url="https://website.com/download/win_installer_0.21.1.exe"
                 length="29052476"
                 type="application/octet-stream"/>
    </item>
    <item>
      <title>Version 0.20.1</title>
      <link>https://website.com/downloads/</link>
      <sparkle:version>0.20.1</sparkle:version>
      <pubDate>Tue, 02 Jun 2024 14:38:00 +0000</pubDate>
      <enclosure sparkle:os="windows"
                 url="https://website.com/download/win_installer_0.20.1.exe"
                 length="29051875"
                 type="application/octet-stream"/>
    </item>
    <item>
      <title>Version 0.19.1</title>
      <link>https://laseranimation.com/downloads/</link>
      <sparkle:version>0.19.1</sparkle:version>
      <pubDate>Tue, 01 Jun 2024 14:38:00 +0000</pubDate>
      <enclosure sparkle:os="windows"
                 url="https://website.com/download/win_installer_0.19.1.exe"
                 length="29052476"
                 type="application/octet-stream"/>
    </item>
  </channel>
</rss>

Meaning the order of the item's versions are:

  • 0.21.1
  • 0.20.1
  • 0.19.1

Now if my application has the version number 0.20.0 and I call the feed above the update to 0.21.1 is correctly offered.

But if the order of items in the feed is:

  • 0.20.1
  • 0.21.1
  • 0.19.1

Then, using version 0.20.0, I get offered 0.20.1 as the new available version. I would expect it to be the highest number in the feed.

The weird behaviour is even more pronounced, if I put the order like this:

  • 0.19.1
  • 0.20.1
  • 0.21.1

Then no new version is offered, even though there are two new version in the feed.

Is this as intended or do I need to put some more properties/flags somewhere in the feed?

Thank you very much in advance!

Foaly avatar Jun 05 '24 09:06 Foaly