Conditional replacements #799
-
Within the install instructions of my project I have a ## Installation
First, install the component by adding the following to your `shard.yml`, then running `shards install`:
```yaml
dependencies:
athena-clock:
github: athena-framework/clock
version: ~> 0.2.0
``` Because I want to encourage users to follow semver, I keep it like this even if there is a - path: src/components/clock/docs/README.md
find: ' version: ~> .*'
replace: ' version: ~> {{.Major}}.{{.Minor}}.0'
on: minor Such that it would only get replaced on a major or minor version bump. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Actually after typing this out I realized it doesn't have to be conditional. I could just have it run every time and would only ever actually change when I actually do a major/minor bump. Otherwise it would just replace it with the same thing. |
Beta Was this translation helpful? Give feedback.
Actually after typing this out I realized it doesn't have to be conditional. I could just have it run every time and would only ever actually change when I actually do a major/minor bump. Otherwise it would just replace it with the same thing.