Kunna is a Go-based synchronization tool that mirrors our projects main branch (regarded as the production branch) from our GitLab instance to our BunnyCDN instance. This makes our projects available for download via our installer.
Clone this repository to any location on your computer.
git clone https://github.com/aeronautical-studios/kunna.git
You will need Go installed on your computer to build and run the application. The Go version used for development is Go 1.19.3
.
Kunna uses a config.json
file for its configuration. Here is an example:
{
"DiscordWebHook": "",
"TempStoragePath": "",
"GitlabInstanceUrl": "",
"GitLabAPIKey": "",
"BunnyCDNStorageUrl": "",
"BunnyCDNStoragePullZone": "",
"BunnyCDNAPIKey": "",
"BunnyCDNApiUrl": ""
}
Note: Please replace the empty strings with your actual values.
To run Kunna, use the command:
go run .
To build an executable, use the command:
go build
Kunna includes a logging system that outputs to a file. Log files are named log_<timestamp>.log.
If an error occurs, an embed will be sent to a Discord channel via a webhook (url specified in the config.json).\
Kunna uses temporary storage to process files before sending them to the BunnyCDN. The location of this storage is specified in the config.json
file.
File comparison is used to decide which files need to be uploaded or deleted from BunnyCDN. The decision is based on comparing hashes of files (generated by kushn) from GitLab and BunnyCDN.
Kunna will automatically sync repositories at intervals. The sync operation consists of fetching repositories from GitLab, comparing files, and performing necessary upload or delete operations on BunnyCDN.
If you encounter any bugs or issues, feel free to open an issue in this repository.
We welcome any form of contribution. Please first discuss the change you wish to make via an issue.
Please see the LICENSE
file for details on the license.
For any inquiries or support, please contact us via [email protected].
- The Go team for their wonderful programming language
- The GitLab team for their awesome platform
- The BunnyCDN team for their robust CDN service