-
-
Notifications
You must be signed in to change notification settings - Fork 320
feat(bump): add --version-files-only and deprecate --files-only #1802
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
Open
bearomorphism
wants to merge
1
commit into
next-release
Choose a base branch
from
pr-1659
base: next-release
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+68
−31
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -418,7 +418,8 @@ def test_bump_files_only(tmp_commitizen_project, util: UtilFixture): | |||||||||||
|
|
||||||||||||
| util.create_file_and_commit("feat: another new feature") | ||||||||||||
| with pytest.raises(ExpectedExit): | ||||||||||||
| util.run_cli("bump", "--yes", "--files-only") | ||||||||||||
| util.run_cli("bump", "--yes", "--version-files-only") | ||||||||||||
|
|
||||||||||||
| assert git.tag_exist("0.3.0") is False | ||||||||||||
|
|
||||||||||||
| with open(tmp_version_file, encoding="utf-8") as f: | ||||||||||||
|
|
@@ -1175,7 +1176,7 @@ def test_bump_changelog_contains_increment_only( | |||||||||||
| # it should only include v3 changes | ||||||||||||
| util.create_file_and_commit("feat(next)!: next version") | ||||||||||||
| with pytest.raises(ExpectedExit): | ||||||||||||
| util.run_cli("bump", "--yes", "--files-only", "--changelog-to-stdout") | ||||||||||||
| util.run_cli("bump", "--yes", "--version-files-only", "--changelog-to-stdout") | ||||||||||||
| out, _ = capsys.readouterr() | ||||||||||||
|
|
||||||||||||
| assert "3.0.0" in out | ||||||||||||
|
|
@@ -1463,3 +1464,11 @@ def test_changelog_config_flag_merge_prerelease_only_prerelease_present( | |||||||||||
| out = f.read() | ||||||||||||
|
|
||||||||||||
| file_regression.check(out, extension=".md") | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| @pytest.mark.usefixtures("tmp_commitizen_project") | ||||||||||||
| def test_bump_deprecate_files_only(util: UtilFixture): | ||||||||||||
| util.create_file_and_commit("feat: new file") | ||||||||||||
| with pytest.warns(DeprecationWarning): | ||||||||||||
| with pytest.raises(ExpectedExit): | ||||||||||||
| util.run_cli("bump", "--yes", "--files-only") | ||||||||||||
|
Comment on lines
+1472
to
+1474
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,8 @@ | ||||||
| usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog] | ||||||
| [--no-verify] [--yes] [--tag-format TAG_FORMAT] | ||||||
| [--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}] | ||||||
| [--devrelease DEVRELEASE] [--increment {MAJOR,MINOR,PATCH}] | ||||||
| usage: cz bump [-h] [--dry-run] [--files-only] [--version-files-only] | ||||||
| [--local-version] [--changelog] [--no-verify] [--yes] | ||||||
| [--tag-format TAG_FORMAT] [--bump-message BUMP_MESSAGE] | ||||||
| [--prerelease {alpha,beta,rc}] [--devrelease DEVRELEASE] | ||||||
| [--increment {MAJOR,MINOR,PATCH}] | ||||||
| [--increment-mode {linear,exact}] [--check-consistency] | ||||||
| [--annotated-tag] | ||||||
| [--annotated-tag-message ANNOTATED_TAG_MESSAGE] [--gpg-sign] | ||||||
|
|
@@ -24,7 +25,9 @@ options: | |||||
| --dry-run Perform a dry run, without committing or modifying | ||||||
| files. | ||||||
| --files-only Bump version in the `version_files` specified in the | ||||||
| configuration file only. | ||||||
| configuration file only(deprecated; use --version- | ||||||
| files-only instead). | ||||||
| --version-files-only bump version in the files from the config | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| --local-version Bump version only the local version portion (ignoring | ||||||
| the public version). | ||||||
| --changelog, -ch Generate the changelog for the latest version. | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.