'Does semantic-release have a replacer to replace a string in a file?
I was surprised not to see a plugin for semantic-release to do replacing of strings (e.g., by regex) within files, e.g., to update the version string in a service-worker (as well as README).
Does semantic-release have such a feature or plugin?
Solution 1:[1]
There is no official plugin to do that.
You can use a npm script or @semantic-release/exec to run a script that do the replacement during the prepare step.
See How can I use a npm build script that requires the package.json’s version ?.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Pierre Vanduynslager |
