Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add support for nightly channel #1561

Merged
merged 1 commit into from
Jul 3, 2018
Merged
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
12 changes: 10 additions & 2 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ export function getPackageRoot() {
}
}

function getAtomAppName() {
const match = atom.getVersion().match(/beta|nightly/)
if (match) {
return `Atom ${match[0].charAt(0).toUpperCase() + match[0].slice(1)} Helper`
}

return 'Atom Helper'
}

export function getAtomHelperPath() {
if (process.platform === 'darwin') {
const beta = atom.appVersion.match(/-beta/);
const appName = beta ? 'Atom Beta Helper' : 'Atom Helper';
const appName = getAtomAppName()
return path.resolve(process.resourcesPath, '..', 'Frameworks',
`${appName}.app`, 'Contents', 'MacOS', appName);
} else {
Expand Down