Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(version-cmd)!: drop implied tag#959

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
beatreichenbach wants to merge1 commit intopython-semantic-release:masterfrombeatreichenbach:no-tag
Closed
Show file tree
Hide file tree
Changes fromall 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
9 changes: 4 additions & 5 deletionsdocs/commands.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -309,7 +309,7 @@ For example, assuming a project is currently at version 1.2.3::
************************

Whether or not to perform a ``git commit`` on modifications to source files made by ``semantic-release`` during this
command invocation, and to run ``git tag`` on this new commit with a tag corresponding to the new version.
command invocation.

If ``--no-commit`` is supplied, it may disable other options derivatively; please see below.

Expand All@@ -324,8 +324,7 @@ If ``--no-commit`` is supplied, it may disable other options derivatively; pleas
************************

Whether or not to perform a ``git tag`` to apply a tag of the corresponding to the new version during this
command invocation. This option manages the tag application separate from the commit handled by the ``--commit``
option.
command invocation.

If ``--no-tag`` is supplied, it may disable other options derivatively; please see below.

Expand DownExpand Up@@ -353,7 +352,7 @@ version released.
Whether or not to push new commits and/or tags to the remote repository.

**Default:** ``--no-push`` if :ref:`--no-commit <cmd-version-option-commit>` and
:ref:`--no-tag <cmd-version-option-tag>` isalsosupplied, otherwise ``push`` is the default.
:ref:`--no-tag <cmd-version-option-tag>` is supplied, otherwise ``push`` is the default.

.. _cmd-version-option-vcs-release:

Expand All@@ -365,7 +364,7 @@ releases in GitHub and Gitea remotes are supported. If releases aren't supported
remote VCS, this option will not cause a command failure, but will produce a warning.

**Default:** ``--no-vcs-release`` if ``--no-push`` is supplied (including where this is
implied by supplyingonly``--no-commit``), otherwise ``--vcs-release``
implied by supplying ``--no-commit`` or ``--no-tag``), otherwise ``--vcs-release``

``--skip-build``
****************
Expand Down
24 changes: 14 additions & 10 deletionssemantic_release/cli/commands/version.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -446,20 +446,24 @@ def version( # noqa: C901
log.info("Forcing use of %s as the prerelease token", prerelease_token)
translator.prerelease_token = prerelease_token

# Only push ifwe're committing changes
# Only push ifchanges are committed or tagged
if push_changes and not commit_changes and not create_tag:
log.info("changes will not be pushed because --no-commit disables pushing")
log.info(
"changes will not be pushed because --no-commit --no-tag disables pushing"
)
push_changes &= commit_changes

# Only push if we're creating a tag
if push_changes and not create_tag and not commit_changes:
log.info("new tag will not be pushed because --no-tag disables pushing")
push_changes &= create_tag

# Only make a release if we're pushing the changes
# Only make a release if changes are pushed
if make_vcs_release and not push_changes:
log.info("No vcs release will be created because pushing changes is disabled")
make_vcs_release &= push_changes
# Only make a release if changes are committed
if make_vcs_release and not commit_changes:
log.info("No vcs release will be created because --no-commit disables release")
make_vcs_release &= commit_changes
# Only make a release if tagged
if make_vcs_release and not create_tag:
log.info("No vcs release will be created because --no-tag disables release")
make_vcs_release &= create_tag

if not forced_level_bump:
with Repo(str(runtime.repo_dir)) as git_repo:
Expand DownExpand Up@@ -648,7 +652,7 @@ def version( # noqa: C901
# are disabled, and the changelog generation is disabled or it's not
# modified, then the HEAD commit will be tagged as a release commit
# despite not being made by PSR
ifcommit_changes orcreate_tag:
if create_tag:
project.git_tag(
tag_name=new_version.as_tag(),
message=new_version.as_tag(),
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp