Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

✨ Add file source with regex search #34

Closed
wants to merge 1 commit into from
Closed

Conversation

mickare
Copy link

@mickare mickare commented Oct 26, 2023

Add new source feature that reads the version from an arbitrary file and use a custom regex search.

This enables two examplary use-cases:

  • VERSION files generated by CICD
  • CHANGELOG.md as single point of truth for version (e.g. in a monorepo)

Example:

[tool.poetry-version-plugin]
source = "file"
path = "CHANGELOG.md"
match = '^## \[(?P<version>\d+(\.\d+)+)]'

I tried my best to match the current code & docu style. 😊

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ed7efcb) to head (5bef129).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #34   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          160       239   +79     
=========================================
+ Hits           160       239   +79     

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

@mickare
Copy link
Author

mickare commented Aug 16, 2024

Closing to cleanup.

@mickare mickare closed this Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant