|
| 1 | +# cargo-release configuration |
| 2 | + |
| 3 | +tag-message = "{{version}}" |
| 4 | +no-dev-version = true |
| 5 | +pre-release-commit-message = "Release {{version}}" |
| 6 | + |
| 7 | +# Change the changelog's `Unreleased` section to refer to this release and |
| 8 | +# prepend a new `Unreleased` section |
| 9 | +[[pre-release-replacements]] |
| 10 | +file = "CHANGELOG.md" |
| 11 | +search = "## Unreleased\n" |
| 12 | +replace = """ |
| 13 | +## Unreleased |
| 14 | +
|
| 15 | +No changes. |
| 16 | +
|
| 17 | +## [v{{version}}] {{date}} |
| 18 | +""" |
| 19 | + |
| 20 | +# Change the tag links in the bottom of the file |
| 21 | +# |
| 22 | +# The <!-- cargo-release: latest tag --> marker is needed to |
| 23 | +# reliably match on the latest tag |
| 24 | +[[pre-release-replacements]] |
| 25 | +exactly = 1 |
| 26 | +file = "CHANGELOG.md" |
| 27 | +search = """ |
| 28 | +<!-- cargo-release: latest tag --> |
| 29 | +\\[[a-z0-9\\.-]+\\]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/[a-z0-9\\.-]+ |
| 30 | +""" |
| 31 | +replace = """ |
| 32 | +<!-- cargo-release: latest tag --> |
| 33 | +[v{{version}}]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v{{version}} |
| 34 | +[v{{prev_version}}]: https://github.com/stm32-rs/stm32f3xx-hal/releases/tag/v{{prev_version}} |
| 35 | +""" |
| 36 | + |
| 37 | +# Bump the version inside the example manifest in `README.md` |
| 38 | +[[pre-release-replacements]] |
| 39 | +file = "README.md" |
| 40 | +search = 'stm32f3xx-hal = \{ version = "[a-z0-9\\.-]+",' |
| 41 | +replace = 'stm32f3xx-hal = { version = "{{version}}",' |
| 42 | + |
| 43 | +# Point to the latest release in documentation |
| 44 | +# |
| 45 | +# All files have to be listed here, until |
| 46 | +# https://github.com/sunng87/cargo-release/issues/104 |
| 47 | +# is implemented. |
| 48 | +[[pre-release-replacements]] |
| 49 | +min = 0 |
| 50 | +file = "src/i2c.rs" |
| 51 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 52 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 53 | + |
| 54 | +[[pre-release-replacements]] |
| 55 | +min = 0 |
| 56 | +file = "src/serial.rs" |
| 57 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 58 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 59 | + |
| 60 | +[[pre-release-replacements]] |
| 61 | +min = 0 |
| 62 | +file = "src/watchdog.rs" |
| 63 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 64 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 65 | + |
| 66 | +[[pre-release-replacements]] |
| 67 | +min = 0 |
| 68 | +file = "src/gpio.rs" |
| 69 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 70 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 71 | + |
| 72 | +[[pre-release-replacements]] |
| 73 | +min = 0 |
| 74 | +file = "src/dma.rs" |
| 75 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 76 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 77 | + |
| 78 | +[[pre-release-replacements]] |
| 79 | +min = 0 |
| 80 | +file = "src/can.rs" |
| 81 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 82 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 83 | + |
| 84 | +[[pre-release-replacements]] |
| 85 | +min = 0 |
| 86 | +file = "src/adc.rs" |
| 87 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 88 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 89 | + |
| 90 | +[[pre-release-replacements]] |
| 91 | +min = 0 |
| 92 | +file = "src/usb.rs" |
| 93 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 94 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
| 95 | + |
| 96 | +[[pre-release-replacements]] |
| 97 | +min = 0 |
| 98 | +file = "src/lib.rs" |
| 99 | +search = "https://github.com/stm32-rs/stm32f3xx-hal/blob/[a-z0-9\\.-]+/" |
| 100 | +replace = "https://github.com/stm32-rs/stm32f3xx-hal/blob/v{{version}}/" |
0 commit comments