Server
This will check your resource's version with its version on github using API
lib.version.source
this will check the version of the resource's source code on github using the API
lib.version.source(repositoryURL, currentVersion, targetResourceName)Parameters
- repositoryURL
string(optional): the url of the repository you want to compare with your current resource. - currentVersion
string(optional): the version of the resource you have. - targetResourceName
string(optional): the name of the resource you want to check.
Returns
- success
boolean: Whather or not the current resource match the repository you compared with. - response
string: the version of the resource found in gituhb
Examples
lib.version.source('https://github.com/Trippler/tr_lib', '1.0.0', 'tr_lib')Notes
- Archived repositories are skipped.
- Repository with no fxmanifest.lua at the very top are skipped.
lib.version.release
This will check the version of the resource's latest release on github using the release tag
lib.version.release(repositoryURL, releaseTag, targetResourceName)Parameters
- repositoryURL
string(optional): the url of the repository you want to compare with your current resource. - releaseTag
string(optional): the tag of the resource you have. - targetResourceName
string(optional): the name of the resource you want to check.
Returns
- success
boolean: Whather or not the current resource match the repository you compared with. - response
string: the version of the resource found in gituhb
Examples
lib.version.release('https://github.com/Trippler/tr_lib', '1.0.0', 'tr_lib')Callouts
- Archived repositories are skipped
- Repository with no release are skipped
- To be able to use it without passing any parameter, you'll just need to declare your version and repository url in the fxmanifest.lua