mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 21:21:03 +00:00
refactor: let updaters define the files they want to run on (#233)
This change reverses the responsibility for which files the updaters are run on. Now each updater can specify the list of files and wether the files should be created when they do not exist yet. This simplifies the handling of each update in releaserpleaser.go, as we can just iterate over all updaters and call it for each file of that updater. Also update the flags to allow users to easily define which updaters should run.
This commit is contained in:
parent
1e9e0aa5d9
commit
f1aa1a2ef4
20 changed files with 307 additions and 151 deletions
|
|
@ -18,11 +18,11 @@ The component does not support floating tags (e.g.
|
|||
|
||||
The following inputs are supported by the component.
|
||||
|
||||
| Input | Description | Default | Example |
|
||||
| ---------------------- | :-------------------------------------------------------- | ------: | -------------------------------------------------------------------: |
|
||||
| `branch` | This branch is used as the target for releases. | `main` | `master` |
|
||||
| `token` (**required**) | GitLab access token for creating and updating release PRs | | `$RELEASER_PLEASER_TOKEN` |
|
||||
| `extra-files` | List of files that are scanned for version references. | `""` | <pre><code>version/version.go<br>deploy/deployment.yaml</code></pre> |
|
||||
| `update-package-json` | Update version field in package.json file. | `false` | `true` |
|
||||
| `stage` | Stage the job runs in. Must exists. | `build` | `test` |
|
||||
| `needs` | Other jobs the releaser-pleaser job depends on. | `[]` | <pre><code>- validate-foo<br>- prepare-bar</code></pre> |
|
||||
| Input | Description | Default | Example |
|
||||
|------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------:|---------------------------------------------------------------------:|
|
||||
| `branch` | This branch is used as the target for releases. | `main` | `master` |
|
||||
| `token` (**required**) | GitLab access token for creating and updating release PRs | | `$RELEASER_PLEASER_TOKEN` |
|
||||
| `extra-files` | List of files that are scanned for version references by the generic updater. | `""` | <pre><code>version/version.go<br>deploy/deployment.yaml</code></pre> |
|
||||
| `updaters` | List of updaters that are run. Default updaters can be removed by specifying them as -name. Multiple updaters should be concatenated with a comma. Default Updaters: changelog,generic | `""` | `-generic,packagejson` |
|
||||
| `stage` | Stage the job runs in. Must exists. | `build` | `test` |
|
||||
| `needs` | Other jobs the releaser-pleaser job depends on. | `[]` | <pre><code>- validate-foo<br>- prepare-bar</code></pre> |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue