Feature Request: GetSWSVersion() #975
Comments
You can do feature detection to directly test whether the function(s) you require exists. if not reaper.RequiredSWSFunction then
reaper.MB("This script requires SWS v1.2.3.4.", 'Title', 0)
return
end
|
This wouldn't be sufficient, as the functions evolve for new functionality. |
Perfect, thank you @cfillion :) |
As SWS is slowly progressing, some beta-builds are out there with a different subset of functions/actions for bugtesting. But one of the problems is, that it is really difficult to differentiate between these different builds(usually reflecting either the current Master or a PR-build). The following thread describes the problem quite good: https://forum.cockos.com/showthread.php?t=210391 Therefore I propose the following addition to GetSWSVersion: This string must be set by developers, who put out beta-releases according to something like: That way, it would be easier to detect, whether I use an unofficial beta-build for bugtesting. This could be very helpful when helping you finding bugs early on. What do you think? |
There's also the possibility of (automatically) using the latest git branch/commit sha1 or a unique, ever incrementing build number. This would work well with continuous integration (as @swstim proposed...). But in my opinion not so much with manual dev builds: maintaining a betabuild_version is an extra burden and can very easily be forgotten. |
I would love to have a simple function, that returns the currently installed SWS-version.
That way, I could include in my scripts a small check, if the right SWS-version is installed and if not, display an error-message.
Especially with scripts, that shall be used by other people as well, this would be a great benefit and much better than an error-message displayed that functionxyz() wasn't found...
The returned values should be compareable, so I could do something like
The text was updated successfully, but these errors were encountered: