forked from projen/projen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add minimal release documentation (projen#1018)
Fixes projen#982
- Loading branch information
Elad Ben-Israel
authored
Aug 31, 2021
1 parent
6f975ed
commit e66a80f
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Releases and Versioning | ||
|
||
Projen takes care of managing versioning and releases of your project. A project starts with version `0.0.0` and the version | ||
is "bumped" automatically in every release, based on the contents of the release. | ||
|
||
The content of the release is determined by listing all the commits since the last release and parsing them according to | ||
[conventional commits spec](https://www.conventionalcommits.org/en/v1.0.0/). If the release only includes `fix` commits, then | ||
the new version will be a patch version. If the release includes `feat` commits, then the new version will be a minor version. | ||
|
||
If the release includes breaking changes and the major version was not explicitly updated in projenrc (see below), the release will fail. | ||
|
||
## Major Versions | ||
|
||
Each branch is associated with a major version. By default, the major version of the default branch is `0`. | ||
|
||
To bump the major version for the default branch, set the `majorVersion` option to the desired version and push the change. | ||
|
||
For example: | ||
|
||
```js | ||
majorVersion: 1 | ||
``` | ||
|
||
## Release Branches | ||
|
||
Our release model is based on [trunk-based development](https://trunkbaseddevelopment.com/). This means that commits to the default | ||
branch (`main`) are considered ready for production and by default every commit will be released and published to package managers. | ||
|
||
You can add additional release branches (e.g. for different major versions) through the `releaseBranches` option. Each release branch must | ||
be associated with a different major version. | ||
|
||
```js | ||
releaseBranches: { | ||
'2.x': { | ||
majorVersion: 2, | ||
}, | ||
'3.x': { | ||
majorVersion: 3, | ||
prerelease: true, | ||
}, | ||
} | ||
``` |