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

feat(bump): support setting the initial_tag #701

Merged
merged 13 commits into from
Jun 15, 2024
Merged

Conversation

bukowa
Copy link
Contributor

@bukowa bukowa commented Jun 15, 2024

Description

When using bump and no tags are found we can modify default hardcoded 0.1.0

Motivation and Context

When using tags like package-name-v0.0.0 I would like proper initial version.

How Has This Been Tested?

Fixtures included.

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

….0` when using `bump` and no tags are found

Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 36.80%. Comparing base (8a9f9f4) to head (469baa6).
Report is 5 commits behind head on main.

Files Patch % Lines
git-cliff-core/src/release.rs 30.00% 7 Missing ⚠️
git-cliff/src/lib.rs 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
- Coverage   36.89%   36.80%   -0.09%     
==========================================
  Files          18       18              
  Lines        1350     1359       +9     
==========================================
+ Hits          498      500       +2     
- Misses        852      859       +7     
Flag Coverage Δ
unit-tests 36.80% <25.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
@bukowa bukowa marked this pull request as ready for review June 15, 2024 13:14
@bukowa bukowa requested a review from orhun as a code owner June 15, 2024 13:14
Signed-off-by: Bukowa <gitbukowa@gmail.com>
@orhun
Copy link
Owner

orhun commented Jun 15, 2024

Wouldn't it make more sense to use the --tag argument for this instead of an entirely new one? e.g.

# sets the tag to 1.0.0 if no tags are found
$ git cliff --bump --tag 1.0.0

This also aligns with the current use case:

# sets the unreleased changes to 1.0.0
$ git cliff --unreleased --tag 1.0.0

This reverts commit 1499e40.

Signed-off-by: Bukowa <gitbukowa@gmail.com>
Signed-off-by: Bukowa <gitbukowa@gmail.com>
@bukowa
Copy link
Contributor Author

bukowa commented Jun 15, 2024

Wouldn't it make more sense to use the --tag argument for this instead of an entirely new one? e.g.

Like that?

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can you fix the conflicts?

git-cliff-core/src/changelog.rs Outdated Show resolved Hide resolved
This reverts commit 02717ef.

Signed-off-by: Bukowa <gitbukowa@gmail.com>
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@orhun orhun changed the title feat: add initial_tag to bump feat(bump): support setting the initial_tag Jun 15, 2024
@orhun orhun merged commit 7341500 into orhun:main Jun 15, 2024
47 checks passed
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.

3 participants