Skip to content

Commit

Permalink
feat: add release script.
Browse files Browse the repository at this point in the history
Related to #12.
  • Loading branch information
shahinism committed Jul 19, 2024
1 parent a2df968 commit 2d7cd1f
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 8 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## 1.1.0 (2024-07-19)
## v1.1.0 (2024-07-19)

### Feat

- Add release workflow to the main project.
- add changelog to the main project.
- Support generating containers using devenv.
- add Commitzen together with SCM configuration.
Expand All @@ -12,7 +13,8 @@

### Refactor

- update pdm lock and fix installation errors.
- disable release workflow.
- update pdm lock and fix installation errors. (#20)

## v1.0.1 (2024-07-17)

Expand Down
14 changes: 14 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@
git
];

# This script is temporary due to two problems:
# 1. `cz` requires a personal github token to publish a release https://commitizen-tools.github.io/commitizen/tutorials/github_actions/
# 2. `cz bump` fails to sign in a terminal: https://github.com/commitizen-tools/commitizen/issues/1184
scripts.release = {
exec = ''
rm CHANGELOG.md
cz bump --files-only --check-consistency
git tag $(python -c "from src.inception import __version__; print(__version__)")
'';
description = ''
Release a new version and update the CHANGELOG.
'';
};

languages.python = {
enable = true;
venv = {
Expand Down
80 changes: 78 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@ dynamic = ["version"]

[tool.pdm]
distribution = false
path = "src/inception/__init__.py"

[tool.pdm.version]
source = "scm"
write_to = "src/inception/__init__.py"
write_template = '__version__ = "{}"'

[tool.pdm.dev-dependencies]
dev = [
"Commitizen>=3.28.0",
"pdbpp>=0.10.3",
]
[tool.commitizen]
version = "1.0.0"
update_changelog_on_bump = true
version_provider = "scm"
version_provider = "scm"
tag_format = "v$major.$minor.$patch$prerelease"
version_files = [
"src/inception/__init__.py"
]
2 changes: 1 addition & 1 deletion src/inception/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.0.dev"
__version__ = "v1.1.0"

0 comments on commit 2d7cd1f

Please sign in to comment.