Skip to content

Commit

Permalink
Add macOS ot the option parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin committed May 26, 2020
1 parent a47ba97 commit a6dd92c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/option_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -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]);
}
Expand Down

0 comments on commit a6dd92c

Please sign in to comment.