Metadata-Version: 2.4
Name: godot-export-preset-doctor
Version: 0.1.2
Summary: CI-friendly release-readiness checks for Godot export_presets.cfg files.
Author: Godot Export Preset Doctor contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/NonniGB/godot-production-toolkit/tree/main/godot-export-preset-doctor
Project-URL: Issues, https://github.com/NonniGB/godot-production-toolkit/issues
Keywords: godot,export,android,ci,release,gamedev
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Godot Export Preset Doctor

Release-readiness checks for Godot `export_presets.cfg`, focused on Android, CI export hygiene, debug flags, signing safety, package identity, ABIs, icons, and missing export paths.

The tool is a companion to export workflows. It does not build the game; it catches risky preset drift before a release job runs `godot --headless --export-release`.

Use it when a release preset changes, when setting up a new export target, or before cutting a public build from CI.

## Install

```powershell
python -m pip install -e .
```

From PyPI:

```powershell
python -m pip install godot-export-preset-doctor
```

## Quick Start

```powershell
godot-export-doctor C:\Projects\MyGame
godot-export-doctor . --platform Android
godot-export-doctor . --format sarif --output export-doctor.sarif
```

Use `--fail-on none` while exploring a report:

```powershell
godot-export-doctor examples\bad-export-project --fail-on none
```

## Real Workflow: Gate Release Presets In CI

Run the checker before a Godot export step so preset drift fails early:

```powershell
godot-export-doctor . --platform Android --fail-on warning --format sarif --output reports\export-doctor.sarif
```

This is especially useful for:

- catching debug flags that were left enabled in release-like presets;
- checking Android package id, version, icon, and ABI readiness;
- spotting local keystore paths or literal credential values before reports are shared;
- confirming export paths exist and match the expected target.

For a first pass on an existing project, avoid failing the build while you review findings:

```powershell
godot-export-doctor . --platform Android --fail-on none --format json --output reports\export-doctor.json
```

## What It Checks

- Missing `export_presets.cfg`.
- Missing preset name, platform, or export path.
- Android package id, version code/name, enabled ABI, and launcher icon readiness.
- Release-like presets with debug options enabled.
- Hard-coded password, token, secret, or keystore-like values.
- JSON and SARIF output for scripts and CI.

## Configuration

Create `.godot-export-doctor.toml`:

```toml
format = "text"
fail_on = "warning"
platform = "Android"
required_android_abis = ["arm64-v8a"]
```

CLI flags override config values.

## Output

Text:

```powershell
godot-export-doctor .
```

JSON:

```powershell
godot-export-doctor . --format json --output export-report.json
```

SARIF:

```powershell
godot-export-doctor . --format sarif --output export-doctor.sarif
```

## CI Example

```yaml
- run: python -m pip install godot-export-preset-doctor
- run: godot-export-doctor . --platform Android --fail-on warning --format sarif --output reports/export-doctor.sarif
```

## Documentation

- [Android release checklist](docs/ANDROID_RELEASE_CHECKLIST.md)
- [Rule reference](docs/RULE_REFERENCE.md)
- [Security guide](docs/SECURITY_GUIDE.md)
- [Configuration](docs/CONFIGURATION.md)
- [CI integration](docs/CI.md)
- [Troubleshooting](docs/TROUBLESHOOTING.md)

## Development

```powershell
python -m pip install -e .
python -m unittest discover -s tests -v
godot-export-doctor examples\bad-export-project --fail-on none
```

## Design Notes

The checker is intentionally static. It reads Godot config files and reports conservative findings that are useful in local development and CI. It does not need the Godot editor, Android SDK, or network access.

Examples and fixtures are generic by design. They should be safe to publish without exposing private project details.
