# godot-build
Build tool for Godot projects, this makes it easy to do CI/CD.
Features:
* Export projects: release, debug, pack
* Use global templates and system installed godot
* Use local templates and game engine
* Download the required version of templates and game engine
* Auto patch `export_presets.cfg` to use required templates
* Run tests (GUT support)
Return code is 0 if build/test normally. Else return code is 1.
**Warning**: support for operating systems other than Linux is not guaranteed and has not been tested!
## Install
Required python: >= 3.6
```sh
pip install godot-build
# or
yay -S godot-build
```
Or download source code and run `python godot-build/gdbuild.py`.
## Use
```sh
gdbuild -p $PATH_TO_PROJECT -i
# after edit gdbuild.json
gdbuild -p $PATH_TO_PROJECT --test all
gdbuild -p $PATH_TO_PROJECT -o $PATH_TO_BIN_OUTPUT --preset HTML5
```
More help:
```sh
[user@pc gdbuild]$ gdbuild --help
usage: gdbuild --preset HTML5
options:
-h, --help show this help message and exit
-p PATH, --path PATH path to godot project directory
-o OUTPUT, --output OUTPUT
path to output directory
--preset PRESET name of preset
--pack PACK export pack (*.pck or *.zip)
--debug DEBUG export debug build
--test {internal,all,command}
run test
-i, --init initialize gdbuild project
-d, --download download engine and templates
```
### Config
`gdbuild -p $PATH_TO_PROJECT -i` or `gdbuild -p $PATH_TO_PROJECT --init` will create file `gdbuild.json` in given path.
Options:
* `engine_url`: url for download engine (zip file)
* `templates_url`: url for download templatez (tpz or zip file)
* `sha512`: hashes for validate downloaded archives (by file name)
* `templates`: contains template files by preset name (will use in patch `export_presets.cfg`)
* `custom`: toggle use global (false) or local (true) templates and engine
* `global`: global paths to templates and game engine bin
* `version`: require version of templates and game engine
* `test_cmd`: command for run tests (default setup for GUT)
* `timeout`: limit for run build or test in seconds
* `fail_regex`: regex for parse failed tests (return code is also will check)
* `cache_dir`: path to dir for templates and engines cache store
* `engine_file`: name of local (cached) game engine file
Details:
* `engine_url`, `templates_url`, `global.templates`, `engine_file` require contains `{version}` part
* templates archive is zip archive (*.tpz or *.zip), require contains `templates` dir
* game engine archive is zip archive, contains bin file (not in subdirs)
* `test_cmd` require `{godot}` and `{path}` parts
* check `version`: global may differ from local (example: `3.5` is local and `3.5.stable` is global, see `global.templates` path)
* check [repository](https://downloads.tuxfamily.org/godotengine) for more details (version names and sha512 hashes)
## License
GNU GPL v3
Raw data
{
"_id": null,
"home_page": "https://codeberg.org/Denotatum/gdbuild",
"name": "godot-build",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "godot",
"author": "snegg21",
"author_email": "itsveter@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/2a/11/8577cd43b25ec00504368bfbd86d66b47fa76d3fc312c754c88c65cb1747/godot-build-0.1.2.tar.gz",
"platform": null,
"description": "# godot-build\n\nBuild tool for Godot projects, this makes it easy to do CI/CD.\n\nFeatures:\n* Export projects: release, debug, pack\n* Use global templates and system installed godot\n* Use local templates and game engine\n* Download the required version of templates and game engine\n* Auto patch `export_presets.cfg` to use required templates\n* Run tests (GUT support)\n\nReturn code is 0 if build/test normally. Else return code is 1.\n\n**Warning**: support for operating systems other than Linux is not guaranteed and has not been tested!\n\n## Install\n\nRequired python: >= 3.6\n\n```sh\npip install godot-build\n# or\nyay -S godot-build\n```\n\nOr download source code and run `python godot-build/gdbuild.py`.\n\n## Use\n\n```sh\ngdbuild -p $PATH_TO_PROJECT -i\n# after edit gdbuild.json\ngdbuild -p $PATH_TO_PROJECT --test all\ngdbuild -p $PATH_TO_PROJECT -o $PATH_TO_BIN_OUTPUT --preset HTML5\n```\n\nMore help:\n```sh\n[user@pc gdbuild]$ gdbuild --help\nusage: gdbuild --preset HTML5\n\noptions:\n -h, --help show this help message and exit\n -p PATH, --path PATH path to godot project directory\n -o OUTPUT, --output OUTPUT\n path to output directory\n --preset PRESET name of preset\n --pack PACK export pack (*.pck or *.zip)\n --debug DEBUG export debug build\n --test {internal,all,command}\n run test\n -i, --init initialize gdbuild project\n -d, --download download engine and templates\n ```\n\n ### Config\n\n `gdbuild -p $PATH_TO_PROJECT -i` or `gdbuild -p $PATH_TO_PROJECT --init` will create file `gdbuild.json` in given path.\n\n Options:\n * `engine_url`: url for download engine (zip file)\n * `templates_url`: url for download templatez (tpz or zip file)\n * `sha512`: hashes for validate downloaded archives (by file name)\n * `templates`: contains template files by preset name (will use in patch `export_presets.cfg`)\n * `custom`: toggle use global (false) or local (true) templates and engine\n * `global`: global paths to templates and game engine bin\n * `version`: require version of templates and game engine\n * `test_cmd`: command for run tests (default setup for GUT)\n * `timeout`: limit for run build or test in seconds\n * `fail_regex`: regex for parse failed tests (return code is also will check)\n * `cache_dir`: path to dir for templates and engines cache store\n * `engine_file`: name of local (cached) game engine file\n\n Details:\n * `engine_url`, `templates_url`, `global.templates`, `engine_file` require contains `{version}` part\n * templates archive is zip archive (*.tpz or *.zip), require contains `templates` dir\n * game engine archive is zip archive, contains bin file (not in subdirs)\n * `test_cmd` require `{godot}` and `{path}` parts\n * check `version`: global may differ from local (example: `3.5` is local and `3.5.stable` is global, see `global.templates` path)\n * check [repository](https://downloads.tuxfamily.org/godotengine) for more details (version names and sha512 hashes)\n \n## License\n\nGNU GPL v3\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "Build tool for Godot projects.",
"version": "0.1.2",
"split_keywords": [
"godot"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3abb57426b3cc4bbf92b0c4ea1bd1c0c",
"sha256": "13ae107d7b1e72a6797c4c1a3a5e2a3f988c6454b0697d8f6189117e26f1a4cc"
},
"downloads": -1,
"filename": "godot_build-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3abb57426b3cc4bbf92b0c4ea1bd1c0c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7716,
"upload_time": "2022-12-06T06:39:02",
"upload_time_iso_8601": "2022-12-06T06:39:02.268361Z",
"url": "https://files.pythonhosted.org/packages/49/03/777046008337cddd721a5359c70f56c703680a4457bdf46ad2b9c01bcdd3/godot_build-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "df3ff5c55fd8f652dfd21f874620b96f",
"sha256": "bcb1734ea4c1b5483aa7d04d767b74b5c4a88794bae9bbbeb7e6acf929d85f16"
},
"downloads": -1,
"filename": "godot-build-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "df3ff5c55fd8f652dfd21f874620b96f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 7157,
"upload_time": "2022-12-06T06:39:04",
"upload_time_iso_8601": "2022-12-06T06:39:04.769765Z",
"url": "https://files.pythonhosted.org/packages/2a/11/8577cd43b25ec00504368bfbd86d66b47fa76d3fc312c754c88c65cb1747/godot-build-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-06 06:39:04",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "godot-build"
}