Commit f6bc318
fix: reorder hooks after asset build, compute LastVersion deterministically
- Move SafeOnBeforeUpdateAsync and SafeReportUpdateStartedAsync to after
asset list construction so hooks see the real TargetVersion instead of
an empty value (fixes Copilot comment 5).
- Compute LastVersion via Max(new Version(...)) instead of relying on
array ordering (assets[^1].Version). This is correct for both the
local JSON path and custom IDownloadSource implementations whose
ListAsync() may not return sorted results (fixes Copilot comment 4).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 750fe15 commit f6bc318
1 file changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | 327 | | |
337 | 328 | | |
338 | 329 | | |
| |||
365 | 356 | | |
366 | 357 | | |
367 | 358 | | |
368 | | - | |
369 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
370 | 365 | | |
371 | 366 | | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| |||
0 commit comments