this PR adds a check for a seamstress.version_required string outside of a script's init function, to determine if the installed instance of seamstress matches the requirements of the script. if this check fails, the script init() is not executed and an error is printed to the REPL.
test script
seamstress.version_required = "1.0.7" -- replace with different semantic version strings
function init()
print("script loaded!")
end
testing with 1.0.5
failed
seamstress.version_required = "1.0.7" fails with:
seamstress version: 1.0.5
!!! this script (<scriptname>) requires seamstress version 1.0.7
!!! script not initialized, please update seamstress
seamstress.version_required = "2.0.5" fails with:
seamstress version: 1.0.5
!!! this script (<scriptname>) requires seamstress version 2.0.5
!!! script not initialized, please update seamstress
seamstress.version_required = "1.1" fails with:
seamstress version: 1.0.5
!!! this script (<scriptname>) requires seamstress version 1.1
!!! script not initialized, please update seamstress
this PR adds a check for a
seamstress.version_required
string outside of a script'sinit
function, to determine if the installed instance of seamstress matches the requirements of the script. if this check fails, the scriptinit()
is not executed and an error is printed to the REPL.test script
testing with 1.0.5
failed
seamstress.version_required = "1.0.7"
fails with:seamstress.version_required = "2.0.5"
fails with:seamstress.version_required = "1.1"
fails with:passed
seamstress.version_required = "1.0"
seamstress.version_required = "0.0.7"
seamstress.version_required = "0.9.3"
seamstress.version_required = "1.0.5"