| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
@MicaelJarniac, thank you for the git history graph although since your history is longer than 50 commits I can't be certain. But from what I see in the logs and in the commit history, there are no tags in the main branch. Instead your v0.1.1 is in another branch which is not part of the history.
It will evaluate the next version based on what tags are in the current HEAD's history. Which because there are feature commits it will be a minor bump to the base version of 0.0.0 as no tag was detected otherwise. The problem is the tag `v0.1.0 already exists so it can't be created again.
The incompatibility stems from your merging and release strategy, which I'm not sure what you are trying to accomplish there. Seems like ReleaseFlow but not as I would have expected it.
Thanks a lot for the reply!
I think you're right, the tags seem to have been created on branches I've deleted.
This repo I'm working on is quite a mess. I use it as a testing ground for a template I'm creating.
Full history❯ git log --oneline --decorate --graph --all -n 100 * b815ff6 (HEAD -> main, origin/main, origin/HEAD) fix: Discord invite * 0cad873 feat: lock * 6e04c3f feat: template update * aa2a3f7 chore: update template * 4bef4e4 chore: update template * 1a76d3f chore: update template * 80023be chore: update template * a2e739d Merge pull request #21 from MicaelJarniac:MicaelJarniac/issue20 |\ | * d77f929 build(deps): update Poetry to 2.0 |/ * a348dcc chore: template update | * 7c1f16c (origin/dependabot/pip/virtualenv-20.26.6) build(deps-dev): bump virtualenv from 20.26.3 to 20.26.6 |/ | * 38c1195 (origin/dependabot/pip/jinja2-3.1.5) build(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 |/ * ecc77b6 chore: Poetry lock * 0a3bfee chore: update cruft | * 03bab77 (MicaelJarniac/issue16) chore: fix new Ruff | * c7472ac chore: update Ruff and use to format | * 978dafa chore: remove Black |/ * e08eefb Merge pull request #12 from MicaelJarniac:template-update |\ | * ae3faad fix: template update |/ * 25e6968 chore: lockfile * d9a027f Merge pull request #11 from MicaelJarniac:update-template |\ | * 2973b9d chore: update template |/ * ee4f1fc chore: template update * 12a0674 feat: add benchmarking tools (#10) * df022f4 chore: update template * b0fcdbe chore: remove `stubs` Poetry dependency group (#8) * 7af6ce2 chore: template update * f483ae2 chore: template update (#6) * f404355 build(release): update Python Semantic Release * d54c2f7 0.1.1 * 12deb0a build(release): fix build command * f6310dc fix: force release * 6300616 build(release): `build_command = "python -m build"` * 3998d47 build: remove version classifiers, Poetry will add * bda1c81 build: fix URLs * 54e0f0c build(docs): fix Poetry install command * ef171f1 docs(readme): fix action badge * 161bbb1 0.1.0 * 62b76a6 Revert "0.1.0" * 1654708 0.1.0 * 5fef332 Revert "0.1.0" * 3c82321 0.1.0 * f8dcba6 build(release): write permissions * 0f62c43 build: install Poetry to build | * f27d87c (tag: v0.1.1) 0.1.1 | * f572ae9 build(release): fix build command | * 05ca4a6 fix: force release | * d6b8234 build(release): `build_command = "python -m build"` | * b2cb415 Merge pull request #4 from MicaelJarniac/template | |\ | | * 53f677c build: remove version classifiers, Poetry will add | | * 83427df build: fix URLs | * | 17f9a66 Merge pull request #3 from MicaelJarniac/template | |\| | | * a6233b1 build(docs): fix Poetry install command | * | 0507f7b Merge pull request #2 from MicaelJarniac/template | |\| | | * aae7635 docs(readme): fix action badge | * | 3dcb4fb (tag: v0.1.0) 0.1.0 | * | 8b6febb Revert "0.1.0" | * | c6547ad 0.1.0 | |/ | * 264f567 Revert "0.1.0" | * 1ef6a06 0.1.0 | * a879fc5 build(release): write permissions | * c3e85a0 build: install Poetry to build | * ce2e6e8 Merge pull request #1 from MicaelJarniac/poetry | |\ | |/ |/| * | 626e734 build(deps): update lockfile * | 77fb2ec chore: remove `semver` dep * | 0f60fb6 docs: Poetry * | 2823e58 build(docs): install with Poetry * | da22dad build(cd): use PyPI Trusted Publishing * | 911427f chore: `poetry.lock` * | fbaa0ef build(ci): workflows * | 39309b5 fix: Black wouldn't run if Ruff failed * | 3f833b4 build(ci): pre-commit colors * | 86ed9a8 build(ci): don't install setuptools, wheel * | ea1a8cf build(ci): move pre-commit inside Nox * | 49705cf chore: delete `constraints.txt` * | 483fe9d build(ci): specify Python version * | 8168177 build(ci): Poetry `--ansi` results in spam * | 3cedd60 build(ci): remove redundant actions * | b77cf84 build(ci): force color * | 1647bdc build(ci): force color * | 334255d build(ci): experimenting * | 1d463fd build(ci): run on any PR, push to main * | 1b3ac11 build(ci): use `snok/install-poetry` * | eb06080 build(ci): `poetry shell` * | f30a9e9 build(ci): use Poetry * | 12f5620 build(ci): Poetry pre-commit hooks * | 8354116 test: Nox with Poetry * | d216b13 build(dev-deps): create linting group * | 21882e0 chore: `tool.ruff.target-version` * | f1bd504 build(deps): `poetry.lock` * | 4d5a25e fix(deps): downgrade `semver` * | d18a95e build(deps): remove `toml` * | 5a6979c build(deps): remove direct dep of `mypy-extensions` * | e228bf4 chore(deps): separate Python and other deps * | 74a406c fix(tools): ignore `.venv` * | 8ec480f fix(build): version variable * | 0ffa934 fix(build): include from `src/` * | 09dc8e3 build: move to Poetry |/ * eaf619d feat: initial commit
Is there a way to force PSR to release a specific version, something like semantic-release version --force 0.2.0? I know I can force bumps, but I couldn't find a way to force an exact version. I suppose I could force a bump to major, but that'd then get me out of SemVer's special 0.x.x behavior.
Is there a way to force PSR to release a specific version, something like semantic-release version --force 0.2.0?
No, there isn't. We expect you to use git locally to do that if you need to set a version.
If you want to do all the other special stuff then I would locally just delete one of the previous tags and move it to the base of your new commits (within HEAD's history). Then run semantic-release locally to create the new version. Just don't push the deletion of the original tag. Then you move on from there.
If you are trying to maintain a changelog you will need to make sure you are in update mode otherwise the branched previous versions will be ignored.
Thanks for the clarification and the suggestions.
| Back | FazBrowse Home | New Git URL |
Question
I have a Cookiecutter template and an instance of the template.
The instance is in a broken state, as it seems that PSR can't detect the current version in order to bump.
https://github.com/MicaelJarniac/crustypy-instance/actions/runs/13345288929/job/37274977188#step:6:14
❯ semantic-release -v version [10:30:51] INFO [util.load_raw_config_file] Loading configuration from pyproject.toml util.py:79 INFO [config.select_branch_options] Using group 'main' options, as 'main' matches 'main' config.py:590 WARNING [config.from_raw_config] Token value is missing! config.py:785 INFO [algorithm.tags_and_versions] found 2 previous tags algorithm.py:62 INFO [algorithm.next_version] No full releases found in this branch's history algorithm.py:300 INFO [algorithm.next_version] The latest release in this branch's history was 0.0.0 algorithm.py:330 INFO [algorithm.next_version] Found 74 commits since the last release! algorithm.py:342 INFO [algorithm.next_version] The type of the next release release is: minor algorithm.py:399 0.1.0 INFO [algorithm.tags_and_versions] found 2 previous tags algorithm.py:62 No release will be made, 0.1.0 has already been released! INFO [github_actions_output.write_if_possible] not writing GitHub Actions output, as no file specified github_actions_output.py:74Configuration
Semantic Release Configurationhttps://github.com/MicaelJarniac/crustypy-instance/blob/0cad8737e179bdf25cf3d878076eaf37b6089af7/pyproject.toml#L124-L142
Additional context
git log --oneline --decorate --graph --all -n 50