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): version_files now support glob patterns (fix #1067) #1070

Conversation

noirbizarre
Copy link
Member

@noirbizarre noirbizarre commented Apr 17, 2024

Description

This PR adds support for glob patterns in version files.

Bump changelog generation has been simplified a bit in the process.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

version_files accept glob patterns instead of raw file names, and all the matching files should be properly bumped and added to the commit when bumping.

Steps to Test This Pull Request

  1. Defined one or many glob patterns in version_files, with an optional line regex
  2. Bump a release
  3. Check that all expected files have been updated with the new version, and committed (if using git)

Additional context

Implements and fixes #1067

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.63%. Comparing base (120d514) to head (752a6a6).
Report is 281 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1070      +/-   ##
==========================================
+ Coverage   97.33%   97.63%   +0.29%     
==========================================
  Files          42       55      +13     
  Lines        2104     2452     +348     
==========================================
+ Hits         2048     2394     +346     
- Misses         56       58       +2     
Flag Coverage Δ
unittests 97.63% <100.00%> (+0.29%) ⬆️

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.

Copy link
Member

@woile woile left a comment

Choose a reason for hiding this comment

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

Awesome change!

@noirbizarre noirbizarre merged commit 62c5cf2 into commitizen-tools:master Apr 18, 2024
18 checks passed
@noirbizarre noirbizarre deleted the feature/version-files-patterns branch April 18, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support pattern paths in version_files
2 participants