diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 48bfbf041..000000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,14 +0,0 @@ -[bumpversion] -current_version = 0.8.0 -commit = True -tag = True - -[bumpversion:file:pyproject.toml] - -[bumpversion:file:./README.md] - -[bumpversion:file:sky130/__init__.py] - -[bumpversion:file:sky130/klayout/pymacros/set_menus.lym] - -[bumpversion:file:sky130/klayout/grain.xml] diff --git a/.changelog.d/changelog_template.jinja b/.changelog.d/changelog_template.jinja new file mode 100644 index 000000000..b4e1f9005 --- /dev/null +++ b/.changelog.d/changelog_template.jinja @@ -0,0 +1,15 @@ +{% if sections[""] %} +{% for category, val in definitions.items() if category in sections[""] %} + +### {{ definitions[category]['name'] }} + +{% for text, values in sections[""][category].items() %} +- {{ text }} {{ values | join(', ') }} +{% endfor %} + +{% endfor %} +{% else %} +No significant changes. + + +{% endif %} diff --git a/CHANGELOG.md b/CHANGELOG.md index 377f5f0b6..456c3a085 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # [Changelog](https://keepachangelog.com/en/1.0.0/) -## [Unreleased](https://github.com/gdsfactory/skywater130/compare/v0.8.0...main) + ## [0.8.0](https://github.com/gdsfactory/skywater130/compare/v0.8.0...v0.7.0) diff --git a/pyproject.toml b/pyproject.toml index d6bfc2ecb..d2c081cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,3 +106,86 @@ mypkg = ["*.csv", "*.yaml"] [tool.setuptools.packages] find = {} + +[tool.tbump] + +[[tool.tbump.before_commit]] +cmd = "towncrier build --yes --version {new_version}" +name = "create & check changelog" + +[[tool.tbump.before_commit]] +cmd = "git add CHANGELOG.md" +name = "create & check changelog" + +[[tool.tbump.before_commit]] +cmd = "grep -q -F {new_version} CHANGELOG.md" +name = "create & check changelog" + +[[tool.tbump.file]] +src = "README.md" + +[[tool.tbump.file]] +src = "pyproject.toml" + +[[tool.tbump.file]] +src = "sky130/__init__.py" + +[[tool.tbump.file]] +src = "sky130/klayout/pymacros/set_menus.lym" + +[[tool.tbump.file]] +src = "sky130/klayout/grain.xml" + +[tool.tbump.git] +message_template = "Bump to {new_version}" +tag_template = "v{new_version}" + +[tool.tbump.version] +current = "0.8.0" +regex = ''' + (?P\d+) + \. + (?P\d+) + \. + (?P\d+) + ''' + +[tool.towncrier] +directory = ".changelog.d" +filename = "CHANGELOG.md" +issue_format = "[#{issue}](https://github.com/gdsfactory/skywater130/issues/{issue})" +package = "gdsfactory" +start_string = "\n" +template = ".changelog.d/changelog_template.jinja" +title_format = "## [{version}](https://github.com/gdsfactory/skywater130/releases/tag/v{version}) - {project_date}" +underlines = ["", "", ""] + +[[tool.towncrier.type]] +directory = "security" +name = "Security" +showcontent = true + +[[tool.towncrier.type]] +directory = "removed" +name = "Removed" +showcontent = true + +[[tool.towncrier.type]] +directory = "deprecated" +name = "Deprecated" +showcontent = true + +[[tool.towncrier.type]] +directory = "added" +name = "Added" +showcontent = true + +[[tool.towncrier.type]] +directory = "changed" +name = "Changed" +showcontent = true + +[[tool.towncrier.type]] +directory = "fixed" +name = "Fixed" +showcontent = true