From 7b179aaf95bd0ffd3bff791129c2c791d4c39f22 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Tue, 4 Jun 2024 23:31:29 +0200 Subject: [PATCH] [Docs] Add more info on branching (#7407) * Add some docs regarding branching https://github.com/inventree/org/issues/45 * remove refs to release candiate branches * Update docs/docs/develop/contributing.md Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com> --------- Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com> --- docs/docs/develop/contributing.md | 34 +++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/docs/docs/develop/contributing.md b/docs/docs/develop/contributing.md index 88248dd6a5..4563487a04 100644 --- a/docs/docs/develop/contributing.md +++ b/docs/docs/develop/contributing.md @@ -54,13 +54,23 @@ invoke setup-dev InvenTree roughly follow the [GitLab flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html) branching style, to allow simple management of multiple tagged releases, short-lived branches, and development on the main branch. +There are nominally 5 active branches: +- `master` - The main development branch +- `stable` - The latest stable release +- `l10n` - Translation branch: Source to Crowdin +- `l10_crowdin` - Translation branch: Source from Crowdin +- `y.y.x` - Release branch for the currently supported version (e.g. `0.5.x`) + +All other branches are removed periodically by maintainers or core team members. This includes old release branches. +Do not use them as base for feature development or forks as patches from them might not be accepted without rebasing. + ### Version Numbering InvenTree version numbering follows the [semantic versioning](https://semver.org/) specification. -### Master Branch +### Main Development Branch -The HEAD of the "main" or "master" branch of InvenTree represents the current "latest" state of code development. +The HEAD of the "master" branch of InvenTree represents the current "latest" state of code development. - All feature branches are merged into master - All bug fixes are merged into master @@ -73,7 +83,6 @@ Feature branches should be branched *from* the *master* branch. - One major feature per branch / pull request - Feature pull requests are merged back *into* the master branch -- Features *may* also be merged into a release candidate branch ### Stable Branch @@ -82,17 +91,24 @@ The HEAD of the "stable" branch represents the latest stable release code. - Versioned releases are merged into the "stable" branch - Bug fix branches are made *from* the "stable" branch -#### Release Candidate Branches -- Release candidate branches are made from master, and merged into stable. -- RC branches are targeted at a major/minor version e.g. "0.5" -- When a release candidate branch is merged into *stable*, the release is tagged - -#### Bugfix Branches +### Bugfix Branches - If a bug is discovered in a tagged release version of InvenTree, a "bugfix" or "hotfix" branch should be made *from* that tagged release - When approved, the branch is merged back *into* stable, with an incremented PATCH number (e.g. 0.4.1 -> 0.4.2) - The bugfix *must* also be cherry picked into the *master* branch. +- A bugfix *might* also be backported from *master* to the *stable* branch automatically if marked with the `backport` label. + +### Translation Branches + +Crowdin is used for web-based translation management. The handling of files is fully automated, the `l10n` and `l10_crowdin` branches are used to manage the translation process and are not meant to be touched manually by anyone. + +The translation process is as follows: +1. Commits to `master` trigger CI by GitHub Actions +2. Translation source files are created and automatically pushed to the `l10n` branch - this is the source branch for Crowdin +3. Crowdin picks up on the new source files and makes them available for translation +4. Translations made in Crowdin are automatically pushed back to the `l10_crowdin` branch by Crowdin once they are approved +5. The `l10_crowdin` branch is merged back into `master` by a maintainer periodically ## API versioning