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
|
||||
livecheck do
|
||||
url "https://example.org/my-app/latest-mac.yml"
|
||||
regex(/MyApp[._-](\d+(?:\.\d+)+)-mac-ddl-stage-(\d+(?:\.\d+)*)-([0-9a-f]+)\.dmg/i)
|
||||
strategy :electron_builder do |yaml, regex|
|
||||
yaml["files"]&.map do |file|
|
||||
match = file["url"]&.match(regex)
|
||||
next if match.blank?
|
||||
url "https://example.org/my-app/latest-mac.yml"
|
||||
regex(/MyApp[._-](\d+(?:\.\d+)+)-mac-ddl-stage-(\d+(?:\.\d+)*)-([0-9a-f]+)\.dmg/i)
|
||||
strategy :electron_builder do |yaml, regex|
|
||||
yaml["files"]&.map do |file|
|
||||
match = file["url"]&.match(regex)
|
||||
next if match.blank?
|
||||
|
||||
"#{match[1]},#{match[2]},#{match[3]}"
|
||||
end
|
||||
end
|
||||
"#{match[1]},#{match[2]},#{match[3]}"
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
#### `Json` `strategy` block
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user