From 5ce0124c4b49bdf78ce34207d08d7d8af8383b52 Mon Sep 17 00:00:00 2001 From: Muescha <184316+muescha@users.noreply.github.com> Date: Thu, 18 Jul 2024 18:00:59 +0200 Subject: [PATCH] Update docs/Brew-Livecheck.md - simplify regex Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> --- docs/Brew-Livecheck.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Brew-Livecheck.md b/docs/Brew-Livecheck.md index 747373d06b..843468801d 100644 --- a/docs/Brew-Livecheck.md +++ b/docs/Brew-Livecheck.md @@ -284,13 +284,13 @@ Similarly, you can work with the `files` array like this: ```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) + regex(/MyApp[._-]v?(\d+(?:\.\d+)+)-(\h+)\.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]}" + "#{match[1]},#{match[2]}" end end end