Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fresholia/mtasa-git-resource-updater
https://github.com/fresholia/mtasa-git-resource-updater
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/fresholia/mtasa-git-resource-updater
- Owner: fresholia
- License: mit
- Created: 2021-01-13T17:23:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-13T21:43:23.000Z (almost 4 years ago)
- Last Synced: 2024-11-05T16:03:01.418Z (about 1 month ago)
- Language: Lua
- Size: 8.79 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mta-sa - mtasa-git-resource-updater - Remotely update the system you publish on GitHub. (Libs and utils)
README
# MTA:SA GitHub Resource Updater
> Welcome, with this module, you can remotely update the system you publish on GitHub.
### How to use it?
- updater.lua & classes.lua add files to the resource you want to update
- Enter the settings from the resource master file as in the example
- Enjoy it### Example
```lua
local updater = load(updater)updater:setVersionFile("version.yml", "json", "version")
updater:setDetails({
user = "cleopatradev",
repo = "mta-git-resource-updater",--The following values are optional, whether or not you enter them
branch = "master", --default
private = true,
token = "bla bla bla",
restartOnComplete = true -- default: false
})updater:on("complete",
function()
end
)updater:on("error",
function(err)
print(err)
end
)updater:on("status",
function(status)
end
)updater:setDebug(false)
--only valid when setDebug(false)
updater:on("progress",
function(downloading, total, fileName)
end
)updater:checkForUpdates()
```