Skip to content

Commit

Permalink
Add deved and dev-edition aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
ariasuni committed Apr 24, 2020
1 parent c941522 commit cf4beb0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 7 additions & 4 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ function normalizeBinary (binaryPath, platform, arch) {
platform = platform || os.platform();
arch = arch || os.arch();
binaryPath = binaryPath || process.env.JPM_FIREFOX_BINARY || "firefox";
if (binaryPath === "deved" || binaryPath === "firefoxdeveloperedition") {
binaryPath = "dev-edition";
}

arch = /64/.test(arch) ? "(64)" : "";
platform = /darwin/i.test(platform) ? "osx" :
Expand All @@ -37,7 +40,7 @@ function normalizeBinary (binaryPath, platform, arch) {
if (platform === "osx") {
var result = null;
var channelNames = [
"firefox", "firefoxdeveloperedition", "beta", "nightly", "aurora"
"firefox", "dev-edition", "beta", "nightly", "aurora"
];

if (channelNames.indexOf(binaryPath) !== -1) {
Expand Down Expand Up @@ -111,7 +114,7 @@ function normalizeBinary (binaryPath, platform, arch) {
normalizeBinary.paths = {
"firefox on osx": "/Applications/Firefox.app/Contents/MacOS/firefox-bin",
"beta on osx": "/Applications/FirefoxBeta.app/Contents/MacOS/firefox-bin",
"firefoxdeveloperedition on osx": "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin",
"dev-edition on osx": "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin",
"aurora on osx": "/Applications/FirefoxAurora.app/Contents/MacOS/firefox-bin",
"nightly on osx": "/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin",
};
Expand All @@ -120,12 +123,12 @@ normalizeBinary.appNames = {
"firefox on linux": "firefox",
"beta on linux": "firefox-beta",
"aurora on linux": "firefox-aurora",
"firefoxdeveloperedition on linux": "firefox-developer-edition",
"dev-edition on linux": "firefox-developer-edition",
"nightly on linux": "firefox-nightly",
"firefox on windows": "Mozilla Firefox",
// the default path in the beta installer is the same as the stable one
"beta on windows": "Mozilla Firefox",
"firefoxdeveloperedition on windows": "Firefox Developer Edition",
"dev-edition on windows": "Firefox Developer Edition",
"aurora on windows": "Aurora",
"nightly on windows": "Nightly"
};
Expand Down
8 changes: 6 additions & 2 deletions test/run/test.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ describe("lib/utils", function () {
[["aurora", "linux", "x86"], "/usr/bin/firefox-aurora"],
[["aurora", "linux", "x86_64"], "/usr/bin/firefox-aurora"],

[["firefoxdeveloperedition", "linux", "x86"], "/usr/bin/firefox-developer-edition"],
[["firefoxdeveloperedition", "linux", "x86_64"], "/usr/bin/firefox-developer-edition"],
[["dev-edition", "linux", "x86"], "/usr/bin/firefox-developer-edition"],
[["dev-edition", "linux", "x86_64"], "/usr/bin/firefox-developer-edition"],
[["deved", "linux", "x86"], "/usr/bin/firefox-developer-edition"],
[["deved", "linux", "x86_64"], "/usr/bin/firefox-developer-edition"],

[["nightly", "linux", "x86_64"], "/usr/bin/firefox-nightly"],
[["nightly", "linux", "x86_64"], "/usr/bin/firefox-nightly"],
Expand All @@ -226,6 +228,8 @@ describe("lib/utils", function () {
[["beta", "darwin", "x86"], "/Applications/FirefoxBeta.app/Contents/MacOS/firefox-bin"],
[["beta", "darwin", "x86_64"], "/Applications/FirefoxBeta.app/Contents/MacOS/firefox-bin"],

[["dev-edition", "darwin", "x86"], "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin"],
[["dev-edition", "darwin", "x86_64"], "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin"],
[["firefoxdeveloperedition", "darwin", "x86"], "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin"],
[["firefoxdeveloperedition", "darwin", "x86_64"], "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin"],

Expand Down

0 comments on commit cf4beb0

Please sign in to comment.