Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Versioning when updating the API Script Library

1590525627

Edited 1590525760
Chris D.
Pro
Sheet Author
API Scripter
Compendium Curator
I am  not 100% certain what is best practices when updating an API in the script library.  I published an API quite a while ago. Lets say I gave it a version number of 1.000 Then I started working on a new/better version, and it took me a very long time, more than half a year. The problem is that people would give me bug reports, and I would fix the bug, but not release the bug fix. Thus bugs I fixed months before were still in the latest reason version. So I finally released V 1.100 which fixed all of V1.000's known bugs, and introduced new ones.  Not wanting to repeat my mistake of not updating frequently, The next weeks I released V1.101, and then V1.102.  So now I was thinking, golly, do I want to have all those different versions out there? Why not just release my next bugfixes directly into V1.102 instead of making yet another version. I tried it, and it works.  So now I am wondering which is best practice? Every release, no matter how minor should be a new Version number, with an edited script.json and a new latest version, but keeping the older versions untouched? Or for minor releases, just put the bugfixes directly into the existing latest version, without editing the script.json. Thoughts? Are there importaint or practical differences or just preferences? Thanks.
1590527047
The Aaron
Roll20 Production Team
API Scripter
I try to follow Semantic Versioning ala:&nbsp; <a href="https://semver.org/" rel="nofollow">https://semver.org/</a> I believe it's better to have many small versions and a new version for each release. That lets you know when a bug gets introduced and gives your users something to fall back to.&nbsp; That said, there's a long-standing bug where you can't select prior versions of 1-click scripts unless you import them.&nbsp;
1590535672
Ada L.
Marketplace Creator
Sheet Author
API Scripter
The maintainers of the repository will yell at you if you fix your bugs in place without creating a new version (and they won't merge your pull request). I second the use of semantic versioning.
1590536351
GiGs
Pro
Sheet Author
API Scripter
And right;y so. The version number is used to check if people get their scripts updated. If you make changes to a script without upping the version number, those who already have it installed will never see those changes - because they already have that version number installed.