-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom template for release notes (GH action) #2
Conversation
👋 Hello tomassebestik, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. Click to see more instructions ...
Review and merge process you can expect ...
|
e74e660
to
ba02913
Compare
ba02913
to
bf91b66
Compare
d0e8e2f
to
5501214
Compare
5501214
to
d378e3c
Compare
d378e3c
to
4a81ddd
Compare
4a81ddd
to
84c90ef
Compare
340335f
to
79a4e54
Compare
Running I have installed the plugin globally with Even if I download the template and point to it manually, the error prevails:
|
Thanks for the changelog template implementation! This now (in theory) looks ready for all of our use cases. |
@radimkarnis I couldn't replicate this either in fresh Docker or natively on Mac Mini M1 aarch64 (which should be same architecture you have): ... i tested with clone of esptool from Github: ...(expand) see the process on BrnoMAC0006 ....espressif@BrnoMAC0006:~/test-plugin/esptool $ uname -a
Darwin BrnoMAC0006.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64
espressif@BrnoMAC0006:~/test-plugin/esptool $ python -V
Python 3.9.20
espressif@BrnoMAC0006:~/test-plugin/esptool $ pip list | grep commitizen
commitizen 3.29.0
[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
espressif@BrnoMAC0006:~/test-plugin/esptool $ pip list | grep czespressif
czespressif 1.0.1.dev2
[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
espressif@BrnoMAC0006:~/test-plugin/esptool $ pip show -f czespressif
Name: czespressif
Version: 1.0.1.dev2
Summary: Commitizen tools plugin with Espressif code style
Home-page:
Author: Espressif Systems
Author-email: Tomas Sebestik <[email protected]>
License: Copyright 2024 Espressif
... # here full license text, redacted
Location: /Users/espressif/.pyenv/versions/3.9.20/lib/python3.9/site-packages
Requires: commitizen
Required-by:
Files:
czespressif-1.0.1.dev2.dist-info/INSTALLER
czespressif-1.0.1.dev2.dist-info/LICENSE
czespressif-1.0.1.dev2.dist-info/METADATA
czespressif-1.0.1.dev2.dist-info/RECORD
czespressif-1.0.1.dev2.dist-info/REQUESTED
czespressif-1.0.1.dev2.dist-info/WHEEL
czespressif-1.0.1.dev2.dist-info/entry_points.txt
czespressif-1.0.1.dev2.dist-info/top_level.txt
czespressif/__init__.py
czespressif/__pycache__/__init__.cpython-39.pyc
czespressif/__pycache__/config.cpython-39.pyc
czespressif/__pycache__/czespressif.cpython-39.pyc
czespressif/__pycache__/defaults.cpython-39.pyc
czespressif/__pycache__/example.cpython-39.pyc
czespressif/__pycache__/questions.cpython-39.pyc
czespressif/config.py
czespressif/czespressif.py
czespressif/defaults.py
czespressif/example.py
czespressif/questions.py
czespressif/templates/CHANGELOG.md.j2
czespressif/templates/RELEASE_NOTES.md.j2 # <--- template file is here
czespressif/templates/macros.md.j2
tests/__pycache__/test_czespressif.cpython-39.pyc
tests/test_czespressif.py
espressif@BrnoMAC0006:~/test-plugin/esptool $ cz changelog v4.6.2 --template="RELEASE_NOTES.md.j2" --file-name="Release_notes.md"
espressif@BrnoMAC0006:~/test-plugin/esptool $ cat Release_notes.md
### 🐛 Bug fixes
- **CH9102F**: Suggest to install new serial drivers if writing to RAM fails *(radim.karnis - f4b5914)*
- **compressed upload**: Accept short data blocks with only Adler-32 bytes *(radim.karnis - d984647)*
### 📖 Documentation
- **boot-log**: fix list formatting *(Peter Dragun - b137d3d)*
- add c2, c6 and h2 as build targets *(Peter Dragun - 590fb55)*
- add explanation for flash_id example to avoid confusion *(Peter Dragun - fbe8066)*
# --- now switch to clean venv:
espressif@BrnoMAC0006:~/test-plugin/esptool $ python -V
Python 3.9.20
espressif@BrnoMAC0006:~/test-plugin/esptool $ python -m venv venv
espressif@BrnoMAC0006:~/test-plugin/esptool $ . venv/bin/activate
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ echo $VIRTUAL_ENV
/Users/espressif/test-plugin/esptool/venv
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool # pip list
Package Version
---------- -------
pip 23.0.1
setuptools 58.1.0
[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ pip install czespressif==v1.0.1.dev2
Collecting czespressif==v1.0.1.dev2
Using cached czespressif-1.0.1.dev2-py3-none-any.whl (23 kB)
Collecting commitizen>=3.29.0
Using cached commitizen-3.29.0-py3-none-any.whl (70 kB)
Collecting importlib_metadata<9,>=8.0.0
Using cached importlib_metadata-8.5.0-py3-none-any.whl (26 kB)
Collecting packaging>=19
Using cached packaging-24.1-py3-none-any.whl (53 kB)
Collecting charset-normalizer<4,>=2.1.0
Using cached charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl (120 kB)
Collecting jinja2>=2.10.3
Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)
Collecting argcomplete<3.6,>=1.12.1
Using cached argcomplete-3.5.0-py3-none-any.whl (43 kB)
Collecting questionary<3.0,>=2.0
Using cached questionary-2.0.1-py3-none-any.whl (34 kB)
Collecting tomlkit<1.0.0,>=0.5.3
Using cached tomlkit-0.13.2-py3-none-any.whl (37 kB)
Collecting termcolor<3,>=1.1
Using cached termcolor-2.4.0-py3-none-any.whl (7.7 kB)
Collecting colorama<0.5.0,>=0.4.1
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting decli<0.7.0,>=0.6.0
Using cached decli-0.6.2-py3-none-any.whl (7.9 kB)
Collecting pyyaml>=3.08
Using cached PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl (172 kB)
Collecting zipp>=3.20
Using cached zipp-3.20.1-py3-none-any.whl (9.0 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl (18 kB)
Collecting prompt_toolkit<=3.0.36,>=2.0
Using cached prompt_toolkit-3.0.36-py3-none-any.whl (386 kB)
Collecting wcwidth
Using cached wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Installing collected packages: wcwidth, zipp, tomlkit, termcolor, pyyaml, prompt_toolkit, packaging, MarkupSafe, decli, colorama, charset-normalizer, argcomplete, questionary, jinja2, importlib_metadata, commitizen, czespressif
Successfully installed MarkupSafe-2.1.5 argcomplete-3.5.0 charset-normalizer-3.3.2 colorama-0.4.6 commitizen-3.29.0 czespressif-1.0.1.dev2 decli-0.6.2 importlib_metadata-8.5.0 jinja2-3.1.4 packaging-24.1 prompt_toolkit-3.0.36 pyyaml-6.0.2 questionary-2.0.1 termcolor-2.4.0 tomlkit-0.13.2 wcwidth-0.2.13 zipp-3.20.1
[notice] A new release of pip is available: 23.0.1 -> 24.2
[notice] To update, run: pip install --upgrade pip
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ pip list | grep cz
czespressif 1.0.1.dev2
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ pip list | grep commitizen
commitizen 3.29.0
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ cz changelog v4.6.2 --template="RELEASE_NOTES.md.j2" --file-name="Release_notes.md"
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ cat Release_notes.md
### 🐛 Bug fixes
- **CH9102F**: Suggest to install new serial drivers if writing to RAM fails *(radim.karnis - f4b5914)*
- **compressed upload**: Accept short data blocks with only Adler-32 bytes *(radim.karnis - d984647)*
### 📖 Documentation
- **boot-log**: fix list formatting *(Peter Dragun - b137d3d)*
- add c2, c6 and h2 as build targets *(Peter Dragun - 590fb55)*
- add explanation for flash_id example to avoid confusion *(Peter Dragun - fbe8066)*
(venv) espressif@BrnoMAC0006:~/test-plugin/esptool $ cat pyproject.toml
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "esptool"
authors = [
{name = "Fredrik Ahlberg (themadinventor)"},
{name = "Angus Gratton (projectgus)"},
{name = "Espressif Systems"}
]
readme = {file = "README.md", content-type = "text/markdown"}
license = {text = "GPLv2+"}
...
...
[tool.commitizen]
version = "4.7.0"
update_changelog_on_bump = true
tag_format = "v$version"
changelog_start_rev = "v4.2.1"
changelog_merge_prerelease = true
annotated_tag = true
bump_message = "change: Update version to $new_version"
name = "czespressif"
version_files = [
"esptool/__init__.py:__version__"
]
release_notes_footer = ""
... @peterdragun Helped me to test the same on another machine - also no issues. I'm almost sure that this is related to something in your system (previous version of commitizen or some of its dependencies). @radimkarnis Can you please help me debug what it happening to you?:
clear;set -x; python -V; pip list; pip show -f czespressif; cat pyproject.toml; set +x
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you, this is a nice addition!
As mentioned, I have tested this on my macOS, python3.12, a fresh clone of esptool in virtual env. Everything seems to work as expected for me.
79a4e54
to
7300083
Compare
I guess the problem is with zsh or my setup. If I move the file to the esptool folder, it works. For some reason it cannot access anywhere else. So I guess you can safely ignore this. |
9e3ac1c
to
691a421
Compare
- nice visual, badges, nice links, logo
691a421
to
6da5eef
Compare
- update structure README, badges, credits - section about solving conflicts commitizen - add example screenshots for release notes and changelog
fix(github-actions): update create-release.yml, missing "v" in version - (dependabot): update dependabot config file, team reviewers - (justfile): add recipe for local cleanup temp, manual tests
6da5eef
to
fcba4a9
Compare
Description
Custom template that can extract the "Release notes" relevant to the current release for an automated release process.
Check the workflow file in #3 – this is a fully automated release process triggered by pushing a Git tag. The process is based on workflows from the project espressif/esptool.
This workflow will generate Release notes or a partial changelog (without a title, header, or footer), containing only the records for the specific release.
The following example command generates the changelog for the release version
v4.8.0
, using the internal template for release notes and writing the partial changelog to a file:Something similar is now available in
espressif/esptool
, but the key differences here are:Additional features:
release_notes_footer
has been added for the target project. This allows the project owner to append a custom footer to the Release notes snippet, defined in the project'spyproject.toml
(orcz.toml
).Screenshots
Changelog before:
Changelog with this plugin:
Release notes before:
Release notes with this plugin:
Try it