From a6dd92cb417681206e2b98344e34d2c71e83d757 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 26 May 2020 07:55:28 +0400 Subject: [PATCH] Add macOS ot the option parser --- scripts/option_parser.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/option_parser.js b/scripts/option_parser.js index ad9e6eb..2d3edf0 100644 --- a/scripts/option_parser.js +++ b/scripts/option_parser.js @@ -37,9 +37,9 @@ module.exports = ({github, context}) => { } function parseBuild(s) { - let pattern = /^(?:builds?|platforms?|OS(?:es)?):\s*(?:(appimage|linux|win(?:dows)?)(?:,\s*(appimage|linux|win(?:dows)?))*)$/gmi; + let pattern = /^(?:builds?|platforms?|OS(?:es)?):\s*(?:(appimage|linux|win(?:dows)?|mac(?:os)?)(?:,\s*(appimage|linux|win(?:dows)?|mac(?:os)?))*)$/gmi; let matches = pattern.exec(s); - let all = ["appimage", "windows"]; + let all = ["appimage", "windows", "mac"]; if (!matches || matches.length < 1) return all; let builds = []; @@ -49,17 +49,22 @@ module.exports = ({github, context}) => { switch (matches[i].toLowerCase()) { case "appimage": case "windows": + case "mac": builds.push(matches[i].toLowerCase()); break; case "win": builds.push("windows"); break; - + case "linux": builds.push("appimage"); break; + case "macos": + builds.push("mac"); + break; + default: console.warn("Unknown build: " + matches[i]); }