Commit cbc6a92
authored
fix(release): stop slot rotation corrupting self-referential shellcheck paths (#770)
## Summary
Fixes #769. The `env.stub` shellcheck directive in the 8.0.0 init
scripts was written as a repo-relative path carrying a version token (`#
shellcheck source=docker/openemr/8.0.0/env.stub`). Because the scripts
were registered as `current`-slot pins, advancing `current` 8.0.0 →
8.1.0 rewrote that directive to point at a sibling dir that never
exists, breaking shellcheck CI on the auto rotation PR (#760).
A `# shellcheck source=` comment is a path to the script's own sibling
file, not a version pin — it should never carry a rotating token.
## Changes
- `docker/openemr/8.0.0/openemr.sh`, `ssl.sh`: use the version-agnostic
`SCRIPTDIR/env.stub` form (matching the existing convention already used
for `devtoolsLibrary.source`). `SCRIPTDIR` resolves to the script's own
dir at lint time and contains no token for the rotator to match.
- `tools/release/versions.yml`: drop the two `shellcheck_source`
entries. After the change above the files hold no version pin, so the
linter no longer flags them — no `excludes:` entry needed.
- `tools/release/tests/SlotRotatorTest.php`: regression test seeding a
`*.sh` with a `SCRIPTDIR` directive plus a genuine rotating token,
asserting the directive survives rotation byte-for-byte.
## Test plan
- [x] `php bin/lint-versions.php` — `openemr.sh`/`ssl.sh` no longer
flagged (the two remaining `rel_branch_ref` findings pre-exist on
`master`, unrelated)
- [x] `vendor/bin/phpunit` — 175 tests green, including the new
regression
- [x] Dry-run rotation reproducing #760 (`--current=8.1 --dry-run`) no
longer touches the `# shellcheck source=` line in either script
- [x] `shellcheck docker/openemr/8.0.0/openemr.sh ssl.sh` — clean1 parent 0346602 commit cbc6a92
4 files changed
Lines changed: 47 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
198 | 229 | | |
199 | 230 | | |
200 | 231 | | |
| |||
230 | 261 | | |
231 | 262 | | |
232 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
233 | 267 | | |
234 | 268 | | |
235 | 269 | | |
| |||
256 | 290 | | |
257 | 291 | | |
258 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
259 | 304 | | |
260 | 305 | | |
261 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 125 | | |
137 | 126 | | |
138 | 127 | | |
| |||
0 commit comments