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

Multiline mode #139

Closed
sobolevn opened this issue Jul 16, 2021 · 3 comments · Fixed by #140
Closed

Multiline mode #139

sobolevn opened this issue Jul 16, 2021 · 3 comments · Fixed by #140
Labels

Comments

@sobolevn
Copy link
Contributor

Right now it is impossible to write your from regex as ^version = ... because regex is not in multiline mode.
Source: https://github.com/google/semantic-release-replace-plugin/blob/master/src/index.ts#L108

Right now both these lines match "from": "version = \".*\"", regex:

[tool.poetry]
version = "1.4.0"

and

[tool.poetry.dependencies]
django-reversion = "^3.0"

I know that I can rewrite my from regex to be stricter on version value, but the easiest way is ^version = \".*\", which is impossible right now.
I also don't want to write something like version = \"\d+\.\d+\.\d+\" because:

  1. It still can match django-reversion = "3.0.1" if I ever want to pin it
  2. It won't match -pre and -beta suffixes and I don't want to make this regex overly complex or sensetive
@sobolevn
Copy link
Contributor Author

Awesome! Would you be so kind to release a new version?

@jpoehnelt
Copy link
Owner

Yeah, currently the release is failing and I haven't had time to debug. I use the same pattern for numerous other packages. I will investigate further Monday.

@github-actions
Copy link

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 a pull request may close this issue.

2 participants