View Single Post
10-21-15, 01:16 PM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Rilgamon View Post
Please describe in 3 sentences the logic of version numbers so that a parser can "read" it as a compareable value.
1.60200
2.60200
3.60200
1.60400
2.60400
Please show me an example of an addon using such a versioning scheme. I have never seen one. I have seen:

60200.1
60200.2
60200.3
60400.1
60400.2

...and that, along with pretty much every verison numbering scheme I've seen mis-detected in Minion, is easily parsed with a few simple rules -- strip "^r%s*", "^v%s*", and other common meaningless prefixes; split on . and - characters; and do simple sorts on the parts. You'd need an additional rule to cover "6.2 Beta" vs "6.2 Release/Stable" and you wouldn't be able to parse Git hashes in WowAce alpha packages, but for the most part, it's very doable. Yes, there will be a few "special" versioning schemes (I'm looking at you, OPie) that can't easily be handled this way, but again, for the most part, it's just not this hard.

Tonyleila's suggestion about comparing the dates is a good one in a perfect world, but may not always be reliable since you can't control how files on the user's machine are timestamped. Let's say an addon is on both Curse and WoWI. The version on Curse is version 5 and was released in December 2013. The version on WoWI is version 12 and was released in August 2015. Now let's say the user just found this addon on Curse and installed it today (October 2015). Now the files on their computer are (definitely if they installed with the Curse Client, and maybe if they installed manually, depending on their software and how it's configured) marked as created/modified October 2015, so checking that against the August 2015 date of the newer version on WoWI will fail.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote