googleapis / googleapis/release-please

Add regex to generic updater which ignores preRelease

Open
#2,181 0 comments 1 reaction 1 assignee Claimed by @chingor13 View on GitHub
priority: p3 type: feature request
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

**Is your feature request related to a problem? Please describe.**
Somewhat related to #2137

**Describe the solution you'd like**
While playing around with workarounds for #2137 I ran across a new issue. If you use `` it always assumes if you have a hyphen after a patch it's `preRelease` and so it's considered the old version and the hyphen gets dropped. It'd be nice if there was an option which only looks at major/minor/patch and any hyphens afterward are treated as not part of the old version which needs replacing.

**Describe alternatives you've considered**
I tried putting all 3 annotations (major, minor, patch) but looking at the code I think you only can pick one. Alternatively, something that specifically understands badges in markdown would be optimal.

**Additional context**
For reference to the alternative mentioned above, here's a reference line. Badges would need to handle both multiple replacements and recognizing img.shields.io URLs which contain hyphens after the version but it's not part of the version:
```markdown
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.