Greasy Fork is available in English.

讨论 » Greasy Fork 反馈

How the version number is compared?

§
发表于: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?

§
发表于: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

NotYou管理员
§
发表于: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.

JasonBarnabe管理员
§
发表于: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.

发表回复

登录以发表回复。