googleapis / googleapis/release-please
`extra-files` feature has no way to update the `Generic` regex parameters
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 588
- Avg merge
- 12h 16m
- Merged PRs (30d)
- 7
Description
This is a feature request to expose the [regex parameters](https://github.com/googleapis/release-please/blob/main/src/updaters/generic.ts#L33-L36) that the `Generic` text updater provides. As far as I can tell there's no way to add an `extra-files` entry that sets these.
My use case is that I want to author a github pipeline using https://github.com/marketplace/actions/release-please-action to manage a unity project. Since unity uses YAML on the ProjectSettings/ProjectSettings.asset file, I tried using the generic updater, but I think that's not going to be the right way to go because:
1. As I understand it the generic YAML updater could manipulate more than just the one field (e.g. re-order fields, remove comments, etc).
2. The assets file uses yaml tags which fail to load in the current generic loader:
```
-------^
at generateError (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:48992:10)
at throwError (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:48996:9)
at composeNode (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50330:7)
at readDocument (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50434:3)
at loadDocuments (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50497:5)
at Object.loadAll (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50510:19)
at GenericYaml.updateContent (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:94499:25)
at GitHub.buildChangeSet (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:87530:51)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:86634:29 {
reason: 'unknown tag !',
mark: {
name: null,
buffer: '%YAML 1.1\n' +
'%TAG !u! tag:unity3d.com,2011:\n' +
```
I think the mechanism I'd be looking to have is something like:
```
extraFiles: [
{
type: text
path: ProjectSettings/ProjectSettings.asset
inlineUpdateRegex: 'bundleVersion:'
}
]
```
I'm happy to try to put together a PR that implements this generic text configuration.
Contributor guide
Assessment
This issue has not been assessed yet.