Skip to content

Commit

Permalink
Merge pull request #115 from callowayproject/decouple-commit-and-tag
Browse files Browse the repository at this point in the history
Decouple commit and tag
  • Loading branch information
coordt authored Dec 29, 2023
2 parents 9418a14 + 10e8ed0 commit 97b94dc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
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

0 comments on commit 97b94dc

Please sign in to comment.