Key takeaways
- Presets tuned in the GUI are reusable from the CLI
- JSON reports work as quality gates
- Exit codes decide whether CI fails
If asset processing only lives in a GUI on someone's laptop, it is not reproducible. CI needs determinism: same input, same command, same output, and a clear failure when something breaks.
One pipeline, two entry points
TexForge's GUI and CLI share the same actions, atlas parameters and presets. That matters: a preset tuned by an artist can be called directly from a script by a technical artist, with no parameter translation.
The usual setup commits presets to the repository, has CI run the command-line tool, and produces atlases and descriptors for the engine build.
What the CLI can do
- Run an action sequence over a folder and write to a target directory.
- Generate atlas images and descriptors in a chosen format.
- Export asset audit reports for naming, dimensions, duplicates and pair rules.
- Emit JSON results for downstream scripts.
texforge-cli --help
texforge-cli batch --preset ui-slices --input ./art --output ./build/art
Turn reports into gates
The dangerous asset bugs do not throw errors — they just look wrong. A missing sprite or a mis-sized icon still builds fine until QA notices. Feeding audit reports into CI catches these before merge.
Have CI parse the JSON report and fail by severity: errors fail the build, warnings go to the log, info is recorded. The team defines the rules, but the decision must be automated.
Exit codes and idempotence
CI trusts exit codes, not the word “Error” in a log. A batch should return non-zero when any item remains failed, so the pipeline stops explicitly.
It should also be idempotent: running twice on the same input produces identical output. Otherwise every build creates meaningless binary diffs and the repository drowns in noise.
Practical advice
- Commit presets and folder rules together as the asset contract.
- Run a small smoke batch in CI before the full run.
- Archive reports with artifacts to trace which configuration a build used.
- Set timeouts and concurrency limits so asset jobs do not stall build machines.
Takeaway
Putting asset processing in CI is not mainly about automation. It is about running with the same rules every time — and failing loudly when those rules break.