|
7 | 7 | release_tag_message_prefix: aifr version |
8 | 8 | version_embedded_file: internal/version/version.go |
9 | 9 |
|
| 10 | +env: |
| 11 | + # Allow a version override to come before the command as an env override, |
| 12 | + # OR to come after the command as a var-assignment. |
| 13 | + # |
| 14 | + # We do this at the top-level because `release:commits-and-tag` uses a |
| 15 | + # sub-process to invoke us, to get the version into a shell variable, and we |
| 16 | + # need the CLI assignment to propagate into the environment. |
| 17 | + # Note though that we do need to explicitly unset this for the _second_ invocation. |
| 18 | + VERSION_OVERRIDE: "{{.VERSION_OVERRIDE}}" |
| 19 | + |
10 | 20 | tasks: |
11 | 21 | default: |
12 | 22 | deps: [help] |
@@ -128,9 +138,6 @@ tasks: |
128 | 138 | env: |
129 | 139 | task_exe: "{{.TASK_EXE}}" |
130 | 140 | task_name: "{{.TASK}}" |
131 | | - # allow the version to come before the command as an env override, |
132 | | - # OR to come after the command as a var-assignment |
133 | | - VERSION_OVERRIDE: "{{.VERSION_OVERRIDE}}" |
134 | 141 | cmd: |-2 |
135 | 142 | shopt -s extglob |
136 | 143 | if [[ -n "${VERSION_OVERRIDE:-}" ]]; then |
@@ -187,7 +194,9 @@ tasks: |
187 | 194 | - 'git commit -o "$version_file" -m "chore: bump hard-coded version to ${release_version}"' |
188 | 195 | - 'git tag -s -m "${message_prefix} ${release_version#v}" -e "$release_version"' |
189 | 196 | - task: next-version:write |
190 | | - - 'git commit -o "$version_file" -m "chore: bump hard-coded version to $(task next-version:show)"' |
| 197 | + vars: |
| 198 | + VERSION_OVERRIDE: "" |
| 199 | + - 'git commit -o "$version_file" -m "chore: bump hard-coded version to $(env VERSION_OVERRIDE="" task next-version:show)"' |
191 | 200 |
|
192 | 201 | _have_cargo_tool:*: # shim for when the binary name == crate name |
193 | 202 | internal: true |
|
0 commit comments