mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use a different name depending on channel
This makes Atom beta install in %LOCALAPPDATA%\atom-beta and stable in %LOCALAPPDATA%\atom so that installs are side by side
This commit is contained in:
@@ -27,11 +27,13 @@ const computedAppVersion = computeAppVersion(
|
||||
const channel = getChannel(computedAppVersion);
|
||||
const appName = getAppName(channel);
|
||||
const executableName = getExecutableName(channel, appName);
|
||||
const channelName = getChannelName(channel);
|
||||
|
||||
module.exports = {
|
||||
appMetadata,
|
||||
apmMetadata,
|
||||
channel,
|
||||
channelName,
|
||||
appName,
|
||||
executableName,
|
||||
computedAppVersion,
|
||||
@@ -50,6 +52,12 @@ module.exports = {
|
||||
snapshotAuxiliaryData: {}
|
||||
};
|
||||
|
||||
function getChannelName(channel) {
|
||||
return channel === 'stable'
|
||||
? 'atom'
|
||||
: `atom-${channel}`;
|
||||
}
|
||||
|
||||
function getChannel(version) {
|
||||
const match = version.match(/\d+\.\d+\.\d+(-([a-z]+)(\d+|-\w{4,})?)?$/);
|
||||
if (!match) {
|
||||
|
||||
@@ -12,6 +12,7 @@ module.exports = packagedAppPath => {
|
||||
const updateUrlPrefix =
|
||||
process.env.ATOM_UPDATE_URL_PREFIX || 'https://atom.io';
|
||||
const options = {
|
||||
name: CONFIG.channelName,
|
||||
title: CONFIG.appName,
|
||||
exe: CONFIG.executableName,
|
||||
appDirectory: packagedAppPath,
|
||||
|
||||
Reference in New Issue
Block a user