Skip to content

Commit f47bca4

Browse files
lancefabiojose
authored andcommitted
chore: add standard-version and release script
This commit adds the `standard-version` module for managing releases. When running `npm run release` the following steps are taken. 1. Retreive the current version of your repository by looking at package.json. 2. Bump the version in package.json based on the commits. 3. Prepends to the CHANGELOG based on the commits (uses conventional-changelog under the hood). 4. Create a new commit including the package.json and updated CHANGELOG. 5. Create a new tag with the new version number. This works best if all commits follow the Conventional Commits specification. https://www.conventionalcommits.org/en/v1.0.0/ Fixes: #56 Signed-off-by: Lance Ball <lball@redhat.com>
1 parent e087805 commit f47bca4

File tree

4 files changed

+1626
-69
lines changed

4 files changed

+1626
-69
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1414

1515
- Removed support for Node.js 6, 7 and 8 - all of which are EOL at this point. Travis CI modified to test on Node.js 10 and 12.
1616

17+
### Added
18+
19+
- Added support for standard-version and conventional-changelog
20+
1721
## [1.0.0]
1822

1923
### Added

Diff for: CONTRIBUTING.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,35 @@ ahead of `master`.
1414

1515
## Changelog
1616

17-
Always update the [CHANGELOG.md](./CHANGELOG.md), following
18-
[this semantics](https://keepachangelog.com/en/1.0.0/).
17+
The [CHANGELOG.md](./CHANGELOG.md) will be updated with your commits if you format
18+
your commit messages following the
19+
[Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/#summary).
20+
If you are unsure what prefix to use for a commit, you can consult the
21+
[package.json](https://github.com/cloudevents/sdk-javascript/blob/master/package.json) file
22+
in this repository. In the `standard-version.types` section, you can see all of the commit
23+
types that will be committed to the changelog based on the prefix in the first line of
24+
your commit message. For example, the commit message:
25+
26+
```log
27+
fix: removed a bug that was causing the rotation of the earth to change
28+
```
29+
30+
will show up in the "Bug Fixes" section of the changelog for a given release.
1931

2032
## Pull Requests
2133

2234
Guidelines about how to perform pull requests.
2335

2436
- before submit the PR, open an issue and link them
2537

38+
### Commit Messages
39+
40+
Please follow the Conventional Commits specification noted above. the first line of
41+
your commit should be prefixed with a type, be a single sentence with no period, and
42+
succinctly indicate what this commit changes.
43+
44+
All commit message lines should be kept to fewer than 80 characters if possible.
45+
2646
### PR to `develop`
2747

2848
- fixes in the documentation (readme, contributors)

0 commit comments

Comments
 (0)