Discussions » Greasy Fork Feedback

How the version number is compared?

§
Posted: 2024-01-05

Hi Mods, I wonder how do we compare the version number? My script was version v1.05 and I want to upgrade it to v1.1, but the page warns me that I didn't increase the version number. So I guess it's not String comparison but some other comparing algorithm?

§
Posted: 2024-01-06

How does "string comparison" for your users would figure out if a version is newer or older?

1.05 probably counts as 1.5

NotYouMod
§
Posted: 2024-01-06

Hi Mods, I wonder how do we compare the version number? My script was version v1.05 and I want to upgrade it to v1.1, but the page warns me that I didn't increase the version number. So I guess it's not String comparison but some other comparing algorithm?

Your version numbers are incorrect. For example: v1.01 should be v1.1, v1.02 ⇾ v1.2 and so on.

Link to the file that is used to compare versions.

§
Posted: 2024-01-06

Link to the file that is used to compare versions.

And that has a comment to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/version/format which is what it's based off.

Post reply

Sign in to post a reply.