Skip to content

fix: enable --print-last-released* when in detached head or non-release branch #926

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

Conversation

codejedi365
Copy link
Contributor

@codejedi365 codejedi365 commented May 13, 2024

Purpose

Rationale

When using PSR to evaluate what the last released tag was, it is irrelevant to impose release branch restrictions on the usage as it doesn't matter what branch you are actually on. --print and --print-tag are not included here as those determine the next version value and those do currently rely upon the release branch configuration.

How I tested

Created test cases that evaluate non-release branch environments in regular or strict mode while using --print-last-released, --print-last-released-tag. The tests also evaluated the same command when in a detached head state.

@codejedi365 codejedi365 self-assigned this May 13, 2024
@codejedi365 codejedi365 force-pushed the fix/branch-restriction-enforcement branch 5 times, most recently from e08c104 to 93f04e7 Compare May 18, 2024 16:17
@codejedi365 codejedi365 force-pushed the fix/branch-restriction-enforcement branch 2 times, most recently from 42a7cfc to 9111990 Compare July 4, 2024 17:55
@codejedi365 codejedi365 changed the title fix: enable --print when in detached head or non-release branch fix: enable --print-last-released* when in detached head or non-release branch Jul 4, 2024
@codejedi365 codejedi365 force-pushed the fix/branch-restriction-enforcement branch from 9111990 to d8e7851 Compare July 5, 2024 03:52
@codejedi365 codejedi365 merged commit 782c0a6 into python-semantic-release:master Jul 6, 2024
7 checks passed
@codejedi365 codejedi365 deleted the fix/branch-restriction-enforcement branch July 6, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow version --print-last-released outside of release branches
1 participant