Skip to content
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

Decouple commit and tag #115

Merged
merged 4 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
export PR_NUMBER=$(gh pr view --json number -q .number || echo "")
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
echo "::notice::PR_NUMBER is: ${PR_NUMBER}"
bump-my-version bump dev bumpversion/__init__.py --no-commit --no-configured-files -v
bump-my-version bump dev bumpversion/__init__.py --no-commit --no-tag --no-configured-files -v
env:
GH_TOKEN: ${{ secrets.PAT }}

Expand Down
3 changes: 0 additions & 3 deletions bumpversion/scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ def commit_to_scm(
@classmethod
def tag_in_scm(cls, config: "Config", context: MutableMapping, dry_run: bool = False) -> None:
"""Tag the current commit in the source code management system."""
if not config.commit:
logger.info("Would not tag since we are not committing")
return
if not config.tag:
logger.info("Would not tag")
return
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_commit_and_tag_from_below_scm_root(repo: str, scm_command: str, scm_cla
[
param(True, True, True, False, False, id="dry-run-stops-commit-and-tag"),
param(True, False, False, True, False, id="commit-no-tag"),
param(False, True, False, False, False, id="no-commit-stops-tag"),
param(False, True, False, False, True, id="no-commit-will-tag"),
],
)
def test_commit_tag_dry_run_interactions(
Expand Down
Loading