mainis always production-ready- Only merge what can be released
- A release is what users can see
- Versions must follow Semantic Versioning
- Never commit directly to
main - Always use a branch
- Merge only via Pull Request (PR)
-
Develop features in separate branches
-
Do not merge features into
mainuntil they are:- fully complete
- ready to be released
-
It is valid to keep finished features in a branch until the planned release (e.g. milestone)
- Create a branch from
main - Fix the bug
- Open PR → merge into
main - Release immediately as a patch version (e.g.
1.0.1)
We follow Semantic Versioning:
- Patch (1.0.x) → bug fixes
- Minor (1.x.0) → new features
- Major (x.0.0) → breaking changes
- Use the release script:
npm run release- Choose version based on changes:
- Only bugfix → patch
- New features included → minor
- Required for all merges into
main - Keep PRs small and focused when possible
- Reviews are lightweight: goal is controlled merges, not perfection
All database changes are versioned as SQL scripts in the /migrations folder.
- Create a new file in
/migrationswith an ascending prefix, e.g.:
migrations/004_add_products_table.sql
- Run the script manually on your dev database
- Commit the script together with the related code
On the next stable release the prod database is migrated during the production deployment (prod.deploy.yaml)
- Always use
IF NOT EXISTS/IF EXISTS-> scripts must be idempotent - Never edit an existing script -> create a new one for corrections
- Only add scripts per PR, never delete them
If it should not be released yet → keep it in a branch
If it's ready for users → merge to main