Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add firefoxdeveloperedition alias on Linux #44

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 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 === "firefoxdeveloperedition") {
binaryPath = "deved";
}

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", "deved", "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",
"deved 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,11 +123,12 @@ normalizeBinary.appNames = {
"firefox on linux": "firefox",
"beta on linux": "firefox-beta",
"aurora on linux": "firefox-aurora",
"deved 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",
"deved on windows": "Firefox Developer Edition",
"aurora on windows": "Aurora",
"nightly on windows": "Nightly"
};
Expand Down
5 changes: 5 additions & 0 deletions test/run/test.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ describe("lib/utils", function () {
[["aurora", "linux", "x86"], "/usr/bin/firefox-aurora"],
[["aurora", "linux", "x86_64"], "/usr/bin/firefox-aurora"],

[["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"],
].map(function(fixture) {
Expand All @@ -223,6 +226,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"],

[["deved", "darwin", "x86"], "/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin"],
[["deved", "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