-
Notifications
You must be signed in to change notification settings - Fork 236
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
Allow version --print
outside of release branches
#900
Comments
@jameshounshell, thank you for your submission. To clarify, #823 answer was only specific to get a detached head state working with the version as it stood at the time. I have reviewed the code related to the detached head restriction and configured release branches and some of what you request should be doable. I do think we are enforcing the release branches configuration a bit too early in the startup process and it can be moved later. I'm a bit more hesitant on the detached head state prevention because we rely on the prerelease token value from the release branches configuration to determine the next version. This cannot be determined from a detached head state. I have considered an automatic resolve from a detached head state but outside of a CI environment this might be less desirable. So in theory, asking for the current version has no restrictions, asking for the next version is restricted in a detached head state (unless a prerelease token/flag option is provided) and unrestricted if branches don't match and |
Current version at least would be amazing. Thank you so much for entertaining this. ❤️ |
Thanks for the response. I don't have an estimated time for resolution yet but likely will be an able to address it over the next month or two, depending on the ease of change. I have a few features and improvements already in work |
Description
Prior to v8, you could print current or upcoming version from any branch or detached head. This is no longer possible because v8 restricts all commands to only run on configured release branches (default:
main
).Use cases
In v7 I found this very useful for testing whether I had a repo setup correctly and I also used it in CI to determine the current version and use that as the tag for a docker image.
Possible implementation
If possible it would be great to allow any operations on any branch/head when the
--noop
flag is provided and instead just warn the user that the operation is normally only allowed on the configured release branches.Caveat
I have scoured the github issues and docs for any discourse on this and I realize that this may never be implemented as it is probably against this project's design principles. Thanks in advance for your consideration.
(Relevant: #823)
Current Workaround
For now since I use the python-semantic-release github action, after main builds a new tag is created, this kicks of the docker build and I just use
${{git.ref_name}}
to name the image since that's the semver.The text was updated successfully, but these errors were encountered: