Skip to content

Commit 528b4a6

Browse files
Merge pull request #144 from MEHRSHAD-MIRSHEKARY/update/docs
docs: Update CODE_OF_CONDUCT rules about versioning
2 parents b7e8d6e + 86d81b4 commit 528b4a6

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

CODE_OF_CONDUCT.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,40 @@ we’re thrilled that you want to contribute to `django_logging`! to ensure a po
3939
git push origin feature/your-feature-name
4040
```
4141

42-
8. **Bump Version**: Use Commitizen to update the version.
42+
8. **Bump Version**: Use Commitizen to automatically update the version number based on commit messages.
43+
44+
First, confirm the current version in the Commitizen configuration (`pyproject.toml`) under `[tool.commitizen]`. For instance:
45+
```text
46+
[tool.commitizen]
47+
version = "1.1.0"
48+
```
49+
Next, run the following command to bump the version:
4350
```bash
4451
cz bump
4552
```
53+
Commitizen will analyze your commit messages and increment the version (major, minor, or patch) according to the Conventional Commits specification.
4654

47-
9. **Generate Changelog**: Create a changelog with Commitizen:
55+
9. **Generate Changelog**: Create a changelog with Commitizen(only for the new version tag):
4856
```bash
49-
cz changelog
57+
cz changelog --incremental
5058
```
59+
the `--incremental` option limits changelog updates to only the new version tag, leaving previous entries unchanged. After generating the changelog, add it to the staging area and commit it manually:
5160

52-
10. **Export Dependencies**: Export the project dependencies for development and production:
61+
```bash
62+
git add CHANGELOG.md
63+
git commit -m "docs: update changelog for new version"
64+
```
65+
This separate commit avoids including the changelog entry in the release notes, keeping them focused on code changes.
66+
67+
10. **Push Code and Tag**: Push the updated code and new version tag to GitHub.
68+
69+
```shell
70+
git push origin feature/your-feature-name
71+
git push origin tag <tag-name>
72+
```
73+
The first command pushes your code changes, and the second command pushes the new version tag created by Commitizen. This ensures that the tag is available on GitHub, which is useful for creating releases and tracking versioned changes.
74+
75+
11. **Export Dependencies**: Export the project dependencies for development and production:
5376
```bash
5477
pip install poetry-plugin-export
5578

0 commit comments

Comments
 (0)