module
Rubellite::Docs::C_VERSIONING_AND_RELEASES::CARBON_VERSIONING
Overview
Internal Versioning & Release Engineering with Carbon
Rubellite adopts Carbon for automated, monotonic version management following the
Lapis versioning standard: <major>.<minor>.<commit_number>.
Every Git commit automatically bumps the commit number across project manifests,
while non-destructive changelog management (changelog.yml -> CHANGELOG.md) tracks features,
fixes, and breaking milestones.
Executive Summary & Key Topics
| Topic | Method / Anchor | Description |
|---|---|---|
| Carbon Version Lifecycle & CLI Commands | .topic_01_version_lifecycle |
Managing version bumps, synchronization, and pre-commit hooks. |
Related Guides & Source References
- shard.yml
- badges.yml
- changelog.yml
- CHANGELOG.md
- src/rubellite/version.cr
Defined in:
rubellite/docs/c_versioning_and_releases/carbon_versioning.crClass Method Summary
-
.topic_01_version_lifecycle : Nil
Carbon Version Lifecycle & CLI Commands: Managing version bumps, synchronization, and pre-commit hooks.
Class Method Detail
Carbon Version Lifecycle & CLI Commands: Managing version bumps, synchronization, and pre-commit hooks.
Carbon automates the entire release pipeline:
| Command | Description |
|---|---|
| `carbon check` | Verifies whether `shard.yml` matches Git commit count |
| `carbon bump` | Manually or via hook advances the commit index |
| `carbon bump --minor` | Increments minor version for new feature milestones |
| `carbon changelog` | Syncs new Git commits into `changelog.yml` and compiles `CHANGELOG.md` |
| `carbon badges` | Renders dynamic badges into `README.md` |
| `carbon doctor` | Audits repository health, hooks, and changelogs |
Working Examples
# Audit repository health and version alignment
bin/carbon check
bin/carbon doctor
# Update changelog and badges
bin/carbon changelog
bin/carbon badges --render
Common Pitfalls & Safety Caveats
- Warning: Never manually edit the commit counter in shard.yml; let Carbon hooks maintain it.
Frequently Asked Questions (FAQ)
- Q: How do Git pre-commit hooks work?
A: The hook executes
carbon bump --hook, which idempotently updates and stages shard.yml and version.cr.