Repository navigation
Commit ce2f4ee
fix(release): stop patch-release-me double-bumping ql/hotspots (#175)
`ql/hotspots/` is deliberately excluded from `.release.yml`'s
"CodeQL Pack Versions" location (added in #158/d0b969e: it's a
separate package published by its own manual workflow_dispatch, not
part of the per-language pack family) - yet it kept getting bumped in
lockstep with every release anyway (most recently 0.2.4 -> 0.3.0 in
PR #173, and 0.2.1 -> 0.2.4 in PR #169 before that).
Root cause, confirmed by running the exact pinned patch-release-me
image locally with --debug against both a minimal repro and a full
copy of this repo's real qlpack.yml files:
1. patch-release-me ships its own hardcoded default location for the
"CodeQL" ecosystem, literally named "CodeQL Packs" (see its
src/defaults.yml), matching **/qlpack.yml with only
`excludes: [/.codeql/]`. Our own custom location was named
"CodeQL Pack Versions" - a different name - so patch-release-me's
config loader (src/config.rs) adds its built-in default *alongside*
ours instead of treating ours as an override (it only skips adding
the default when a location with the exact same `name` already
exists). The built-in default has no idea about our `ql/hotspots/`
exclude, so it bumps that file regardless.
2. Our own location's pattern (`^version:\s*{version}$`) has never
actually matched anything, on any pack, since the day it was
anchored in d0b969e - the `^`/`$` anchor to the whole file, not
each line, without a `(?m)` multiline flag, and `version:` is never
the literal first/last byte of a real multi-line qlpack.yml. All
real bumping has silently been done by the built-in default this
whole time, which is exactly why our exclude never took effect.
Fix (both verified together, locally, against all 28 real qlpack.yml
files in this repo with their actual LF line endings):
- Rename our location to exactly "CodeQL Packs" so patch-release-me's
default-merge logic skips adding its own conflicting built-in
default instead of running both.
- Add the `(?m)` flag so the anchor actually works per-line, keeping
the original anti-partial-match protection (e.g. bumping "0.2.2"
from correctly matching inside "0.2.20") while working at all.
Verified: all 20 real packs bump correctly, `ql/hotspots/qlpack.yml`
stays untouched, `.release.yml` itself still bumps.
Also documents this in CONTRIBUTING.md's "Cutting a release" section
so the location's name/pattern requirements aren't silently broken
again by a future edit.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent ebc1924 commit ce2f4ee
2 files changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
313 | 325 | | |
314 | 326 | | |
315 | 327 | | |
| |||
0 commit comments