Update Brew-Livecheck.md
fix ruby style guide check
This commit is contained in:
parent
8a00f0451b
commit
cee029516e
@ -283,16 +283,17 @@ Or a more complex one:
|
|||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
livecheck do
|
livecheck do
|
||||||
url "https://example.org/my-app/latest-mac.yml"
|
url "https://example.org/my-app/latest-mac.yml"
|
||||||
regex(/MyApp[._-](\d+(?:\.\d+)+)-mac-ddl-stage-(\d+(?:\.\d+)*)-([0-9a-f]+)\.dmg/i)
|
regex(/MyApp[._-](\d+(?:\.\d+)+)-mac-ddl-stage-(\d+(?:\.\d+)*)-([0-9a-f]+)\.dmg/i)
|
||||||
strategy :electron_builder do |yaml, regex|
|
strategy :electron_builder do |yaml, regex|
|
||||||
yaml["files"]&.map do |file|
|
yaml["files"]&.map do |file|
|
||||||
match = file["url"]&.match(regex)
|
match = file["url"]&.match(regex)
|
||||||
next if match.blank?
|
next if match.blank?
|
||||||
|
|
||||||
"#{match[1]},#{match[2]},#{match[3]}"
|
"#{match[1]},#{match[2]},#{match[3]}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `Json` `strategy` block
|
#### `Json` `strategy` block
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user