You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try running cz init programmatically inside docker as shown below
Run a docker container with python:3.10.11
Method 1
printf "\npyproject.toml\ncz_conventional_commits\npoetry: Get and set version from pyproject.toml:tool.poetry.version field\nsemver\nv\$major.\$minor.\$patch\$prerelease\nY\nY\ncommit-msg" | poetry run cz init
Method 2
poetry run cz init <<EOF
pyproject.toml
cz_conventional_commits
poetry: Get and set version from pyproject.toml:tool.poetry.version field
semver
v\$major.\$minor.\$patch\$prerelease
Y
Y
commmit-msg
EOF
Current behavior
Method 1
printf "\npyproject.toml\ncz_conventional_commits\npoetry: Get and set version from pyproject.toml:tool.poetry.version field\nsemver\nv$major.$minor.$patch$prerelease\nY\nY\ncommit-msg" | /root/.local/bin/poetry run cz init
Output 1
Welcome to commitizen!
Answer the questions to configure your project.
For further configuration visit:
https://commitizen-tools.github.io/commitizen/config/
Warning: Input is not a terminal (fd=0).
? Please choose a supported config file: pyproject.toml
? Please choose a cz (commit rule): (default: cz_conventional_commits) cz_customize
? Choose the source of the version: poetry: Get and set version from pyproject.toml:tool.poetry.version field
No Existing Tag. Set tag to v0.0.1
? Choose version scheme: semver
? Please enter the correct version format: (default: "$version") semver
? Create changelog automatically on bump Yes
? Keep major version zero (0.x) during breaking changes Yes
? What types of pre-commit hook you want to install? (Leave blank if you don't want to install) done
You can bump the version running:
cz bump
Configuration complete 🚀
Method 2
poetry run cz init <<EOF
pyproject.toml
cz_conventional_commits
poetry: Get and set version from pyproject.toml:tool.poetry.version field
semver
v\$major.\$minor.\$patch\$prerelease
Y
Y
commmit-msg
EOF
Output 2
Welcome to commitizen!
Answer the questions to configure your project.
For further configuration visit:
https://commitizen-tools.github.io/commitizen/config/
Warning: Input is not a terminal (fd=0).
? Please choose a supported config file: .cz.toml
? Please choose a cz (commit rule): (default: cz_conventional_commits) cz_conventional_commits
? Choose the source of the version: scm: Fetch the version from git and does not need to set it back
No Existing Tag. Set tag to v0.0.1
? Choose version scheme: pep440
? Please enter the correct version format: (default: "$version") v$major.$minor.$patch$prerelease
? Create changelog automatically on bump Yes
? Keep major version zero (0.x) during breaking changes Yes
? What types of pre-commit hook you want to install? (Leave blank if you don't want to install) done
You can bump the version running:
cz bump
Configuration complete 🚀
Desired behavior
Both outputs should be as follows
Welcome to commitizen!
Answer the questions to configure your project.
For further configuration visit:
https://commitizen-tools.github.io/commitizen/config/
? Please choose a supported config file: pyproject.toml
? Please choose a cz (commit rule): (default: cz_conventional_commits) cz_conventional_commits
? Choose the source of the version: poetry: Get and set version from pyproject.toml:tool.poetry.version field
No Existing Tag. Set tag to v0.0.1
? Choose version scheme: semver
? Please enter the correct version format: (default: "$version") v$major.$minor.$patch$prerelease
? Create changelog automatically on bump Yes
? Keep major version zero (0.x) during breaking changes Yes
? What types of pre-commit hook you want to install? (Leave blank if you don't want to install) [commit-msg]
commitizen pre-commit hook is now installed in your '.git'
You can bump the version running:
cz bump
Configuration complete 🚀
Screenshots
No response
Environment
commitizen version: 3.30.0
python version: 3.10.11
docker version: Docker version 27.2.0, build 3ab4256
cz init is running inside a docker container very specifically the python 3.10.11 container
The text was updated successfully, but these errors were encountered:
Description
Steps to reproduce
Run a docker container with python:3.10.11
Method 1
Method 2
Current behavior
Method 1
Output 1
Method 2
Output 2
Desired behavior
Both outputs should be as follows
Screenshots
No response
Environment
commitizen version: 3.30.0
python version: 3.10.11
docker version: Docker version 27.2.0, build 3ab4256
cz init is running inside a docker container very specifically the python 3.10.11 container
The text was updated successfully, but these errors were encountered: