These rules apply to CP Editor since v6.0. The versions before v6.0 may not satisfy these rules.
Versioning of CP Editor is based on Semantic Versioning, but no -rc1
, -beta
, -stable
is included, so every version number must be strictly in the format $X.$Y.$Z
, where $X
, $Y
, and $Z
are all non-negative integers without leading zeros.
The version numbers must be continuous, i.e. no directly from 6.1.2
to 6.3.2
without 6.2.1
is allowed.
At the beginning of a release cycle, we do the following things:
- Create a new branch
v$X.$Y
from the master branch. - Make a new pre-release
$X.$Y.1
. ($X.$Y.0
is for the master branch.) - Make a stable release from the last version (usually
$X.$(Y-1).$Z
, or maybe$(X-1).$W.$Z
).
A release cycle can last for 1~4 weeks, depending on the working progress and the importance of the new features.
We work on three branches at the same time: the master branch, the latest pre-release branch (called the beta branch), and the latest stable release branch (called the stable branch). Other branches are no longer maintained, they may contain bugs that are known by the maintainers.
On the master branch, we make all changes including new features and bug fixes.
On the version branches, we fix bugs only, no new features will be added. Releases are made on version branches only.
When fixing a bug, it should be fixed on the oldest one of the three active branches (stable > beta > master) which contains the bug, and then get merged into the later branches. Version branches shouldn't be ahead of the master branch, so we should create a merge commit and merge the version branch into master instead of squash and merge.
Code-unrelated changes (e.g. issue template changes, CI changes) apply to the master branch only if it's not necessary to apply to other branches.
We make new releases in these cases:
- At the beginning of a release cycle, we regularly make two releases, which is described in the Release cycle part.
- We make stable releases whenever a bug is fixed on the stable branch.
- We make pre-releases when a critical bug is fixed on the beta branch.
We don't change a pre-release into a stable release. If no bugs are found, we can make a stable release that is exactly the same as the pre-release.
Changelogs are manually written for new releases, which contain notable changes in the latest release.
The CHANGELOG.md contains different logs on different branches:
- On the master branch:
- The UNRELEASED changes on the master branch.
- The changes between each two adjacent MINOR versions (usually between
$X.$Y.1
and$X.$(Y+1).1
, or maybe between$X$.$Y.1
and$(X+1).0.1
). No patch version is included.
- On version branches:
- The changelogs of the master branch before the
$X.$Y.1
was released. - The UNRELEASED changes on the version branch.
- The changes between each two adjacent PATCH versions.
- The changelogs of the master branch before the
We update CHANGELOG.md in these cases:
- When any notable changes are made, update the UNRELEASED changes on the branch where the changes are made.
- When releasing a new MINOR version, move the UNRELEASED changes on the master branch to "changes between MINOR versions".
- When releasing a new PATCH version, move the UNRELEASED changes on the corresponding version branch to "changes between PATCH versions".
A changelog between versions should be like this:
<!-- ## v$X.$Y for changes between MINOR versions on the master branch -->
<!-- ## $X.$Y.$Z for stable releases on the version branch -->
<!-- ## $X.$Y.$Z (Beta) for beta releases on the version branch -->
<!-- "Nothing changed." here when releasing a stable release which is exactly the same as the latest pre-release at the beginning of a release cycle -->
### Added
- Foo is added.
- Bar is added.
### Fixed
- Something is fixed.
### Changed
- Another thing is changed.
The changelog of a GitHub Releases is a part of CHANGELOG.md, usually of the corresponding single version, but the changelog of a stable release at the beginning of a release cycle on GitHub should be all changelogs of that MINOR version.
Suppose you are releasing the version 2.3.7
:
- Modify the version in CMakeLists.txt to
2.3.7
. - Add
## 2.3.7
in CHANGELOG.md underUNRELEASED
. If there's nothing changed, addThis version is the same as 2.3.6, but it's considered stable now.
in the changelog. - Commit with the subject:
Release 2.3.7
. Tag it as2.3.7
. - Push the commit and the tag.
- Edit the changelog of the GitHub Release (the content is the changelog of
2.3.7
) and publish it. - Merge
v2.3
intov2.4
. Create a new branchmerge-2.3.7
based on master. Mergev2.4
intomerge-2.3.7
. Update the version badges in README.md. Create a PR mergingmerge-2.3.7
into master.
Suppose you are releasing the version 2.4.1
:
- Modify the version in CMakeLists.txt to
2.4.1
. - Add
## 2.4.1 (Beta)
in CHANGELOG.md underUNRELEASED
. - Commit with the subject:
Release 2.4.1
. Tag it as2.4.1
. - Push the commit and the tag.
- Edit the changelog of the GitHub Release (the content is the changelog of
2.4.1
) and publish it. - Create a new branch
merge-2.4.1
based on master. Mergev2.4
intomerge-2.4.1
. Update the version badges in README.md. Create a PR mergingmerge-2.4.1
into master.
Suppose you are releasing 2.3.7
and 2.4.1
:
- In the documentation repo, create a new branch
v2.4
based onhugo
(the default branch), push it and manually trigger the deploy action. - Create a new branch
v2.4
based on master. - Checkout to
v2.3
. Change STABLE_VERSION to2.3.
. Update Qt version and Winlibs version in release.yml. Do the first 4 steps to make a new stable release. Also do step 5 but the content of the changelog is all changelogs from2.3.1
to2.3.7
. - Merge
v2.3
intov2.4
. Do the first 5 steps to make a new beta release. - Create a new branch
merge-2.3.7-2.4.1
based on master. Mergev2.4
intomerge-2.3.7-2.4.1
. Set the version in CMakeLists.txt to2.5.0
. Rename## 2.4.1 (Beta)
in CHANGELOG.md to## v2.4
. Update the version badges in README.md. Create a PR mergingmerge-2.3.7-2.4.1
into master.
Pull requests which propose a feature should be based on the master branch.
Pull requests which fix a bug should be based on the oldest one of the three active branches (stable > beta > master) which contains the bug.