Commit ef2e8ce
committed
bump: split multiple_versions on current/new
The `multiple_versions` boolean is true if the current or new versions
are split based on arch but this can cause unexpected behavior when
`multiple_versions` is used as a conditional. In some places we need
to check whether there are multiple current versions and in other
places we need to check if there are multiple new versions, so the
existing value isn't granular enough. This may not be a problem when
both current and new have the same version setup but it can cause
issues when there's a difference.
This changes `multiple_versions` to a hash with boolean values and
updates related conditions to use the contextually appropriate value.
This resolves a couple of issues:
* The current version for multi-arch casks with one `version` were
being split into arm/intel values in the output when the new versions
differ based on arch and vice versa. This effectively ensures that the
current and new versions are only split in the output when the version
differs.
* The `deprecated[:general]` value wasn't being properly set when the
current and new versions didn't have the same version setup, as the
fallback value specifically needs to be set when there aren't multiple
current versions.
Besides that, we also need to specifically check if there are multiple
current versions to be able to properly identify current versions that
are newer than the upstream version when both current and new don't
have the same version setup but this will be addressed in another
commit.1 parent 97ae79c commit ef2e8ce
1 file changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
391 | 393 | | |
392 | 394 | | |
393 | 395 | | |
| |||
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
424 | | - | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
| |||
485 | 487 | | |
486 | 488 | | |
487 | 489 | | |
488 | | - | |
| 490 | + | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
| |||
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | | - | |
| 504 | + | |
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
| |||
562 | 564 | | |
563 | 565 | | |
564 | 566 | | |
565 | | - | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
570 | 572 | | |
571 | | - | |
| 573 | + | |
572 | 574 | | |
573 | 575 | | |
574 | 576 | | |
| |||
0 commit comments