homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
301 stars 28 forks source link

More intelligent detection of the newest item in a Sparkle feed #23

Closed homebysix closed 8 years ago

homebysix commented 8 years ago

Right now Recipe Robot reads all the sparkle:shortVersionString and sparkle:version information for every item in the feed, and does a basic string comparison to determine which item is the "latest" version. However, this fails easily: "999" > "1000"

A better approach would be to get the most recent pubDate.

sheagcraig commented 8 years ago

Wouldn't it be better to do a version comparison with distutils.version.StrictVersion/LooseVersion?

StrictVersion will probably only work 20% of the time, but LooseVersion should be pretty bombproof.

I would think that a and'ed comparison of LooseVersion and pubDate would be doing the best we could do.