8000 Allow `version --print-last-released` outside of release branches · Issue #900 · python-semantic-release/python-semantic-release · GitHub
[go: up one dir, main page]

Skip to content
Allow version --print-last-released outside of release branches  #900
Closed
@jameshounshell

Description

@jameshounshell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedPrevent from becoming stalefeatureA new feature or a feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0