Commit 8ce86ba
committed
cask: extract refresh_for_tag to tolerate asymmetric variations
Add `Cask::Cask#refresh_for_tag`, which refreshes a cask for a simulated
OS/arch tag and tolerates casks that intentionally omit some platforms
(e.g. an `on_linux` block defining only `x86_64_linux`). Use it from
`to_hash_with_variations`, `bump-cask-pr` and `generate-cask-ci-matrix`
instead of repeating the rescue in each caller.
Previously `to_hash_with_variations` raised `invalid 'sha256' value: nil`
for such casks, aborting variation generation entirely.
Signed-off-by: Patrick Linnane <patrick@linnane.io>1 parent edf610a commit 8ce86ba
5 files changed
Lines changed: 71 additions & 19 deletions
File tree
- Library/Homebrew
- cask
- dev-cmd
- test
- cask
- support/fixtures/cask/Casks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
166 | 184 | | |
167 | 185 | | |
168 | 186 | | |
| |||
592 | 610 | | |
593 | 611 | | |
594 | 612 | | |
595 | | - | |
596 | | - | |
597 | | - | |
| 613 | + | |
598 | 614 | | |
599 | 615 | | |
600 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
296 | 297 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
307 | 301 | | |
308 | 302 | | |
309 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
| 191 | + | |
| 192 | + | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
199 | 197 | | |
200 | 198 | | |
201 | 199 | | |
202 | | - | |
203 | | - | |
204 | 200 | | |
205 | 201 | | |
206 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
599 | 613 | | |
600 | 614 | | |
601 | 615 | | |
| |||
744 | 758 | | |
745 | 759 | | |
746 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
747 | 769 | | |
748 | 770 | | |
749 | 771 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments