mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge branch 'master' of github.com:atom/atom into aw/apm-up
This commit is contained in:
@@ -22,13 +22,13 @@ const appMetadata = require(path.join(repositoryRootPath, 'package.json'))
|
||||
const apmMetadata = require(path.join(apmRootPath, 'package.json'))
|
||||
const computedAppVersion = computeAppVersion(process.env.ATOM_RELEASE_VERSION || appMetadata.version)
|
||||
const channel = getChannel(computedAppVersion)
|
||||
const channelDisplayName = getChannelDisplayName(channel)
|
||||
const appName = getAppName(channel)
|
||||
|
||||
module.exports = {
|
||||
appMetadata,
|
||||
apmMetadata,
|
||||
channel,
|
||||
channelDisplayName,
|
||||
appName,
|
||||
computedAppVersion,
|
||||
repositoryRootPath,
|
||||
apmRootPath,
|
||||
@@ -56,9 +56,10 @@ function getChannel (version) {
|
||||
return 'stable'
|
||||
}
|
||||
|
||||
function getChannelDisplayName (channel) {
|
||||
if (channel === 'stable' || channel === 'dev') return null
|
||||
return process.env.ATOM_CHANNEL_DISPLAY_NAME || channel.charAt(0).toUpperCase() + channel.slice(1)
|
||||
function getAppName (channel) {
|
||||
return channel === 'stable'
|
||||
? 'Atom'
|
||||
: `Atom ${process.env.ATOM_CHANNEL_DISPLAY_NAME || channel.charAt(0).toUpperCase() + channel.slice(1)}`
|
||||
}
|
||||
|
||||
function computeAppVersion (version) {
|
||||
|
||||
@@ -12,7 +12,6 @@ module.exports = function (packagedAppPath) {
|
||||
console.log(`Creating Debian package for "${packagedAppPath}"`)
|
||||
const atomExecutableName = CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`
|
||||
const apmExecutableName = CONFIG.channel === 'stable' ? 'apm' : `apm-${CONFIG.channel}`
|
||||
const appName = CONFIG.channel === 'stable' ? 'Atom' : `Atom ${CONFIG.channelDisplayName}`
|
||||
const appDescription = CONFIG.appMetadata.description
|
||||
const appVersion = CONFIG.appMetadata.version
|
||||
let arch
|
||||
@@ -88,7 +87,7 @@ module.exports = function (packagedAppPath) {
|
||||
console.log(`Writing desktop entry file into "${debianPackageApplicationsDirPath}"`)
|
||||
const desktopEntryTemplate = fs.readFileSync(path.join(CONFIG.repositoryRootPath, 'resources', 'linux', 'atom.desktop.in'))
|
||||
const desktopEntryContents = template(desktopEntryTemplate)({
|
||||
appName: appName,
|
||||
appName: CONFIG.appName,
|
||||
appFileName: atomExecutableName,
|
||||
description: appDescription,
|
||||
installDir: '/usr',
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = function (packagedAppPath) {
|
||||
console.log(`Creating rpm package for "${packagedAppPath}"`)
|
||||
const atomExecutableName = CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`
|
||||
const apmExecutableName = CONFIG.channel === 'stable' ? 'apm' : `apm-${CONFIG.channel}`
|
||||
const appName = CONFIG.channel === 'stable' ? 'Atom' : `Atom ${CONFIG.channelDisplayName}`
|
||||
const appName = CONFIG.appName
|
||||
const appDescription = CONFIG.appMetadata.description
|
||||
// RPM versions can't have dashes or tildes in them.
|
||||
// (Ref.: https://twiki.cern.ch/twiki/bin/view/Main/RPMAndDebVersioning)
|
||||
|
||||
@@ -74,7 +74,7 @@ module.exports = function (packagedAppPath) {
|
||||
const verifySnapshotScriptPath = path.join(CONFIG.repositoryRootPath, 'script', 'verify-snapshot-script')
|
||||
let nodeBundledInElectronPath
|
||||
if (process.platform === 'darwin') {
|
||||
const executableName = CONFIG.channelDisplayName ? `Atom ${CONFIG.channelDisplayName}` : 'Atom'
|
||||
const executableName = CONFIG.appName
|
||||
nodeBundledInElectronPath = path.join(packagedAppPath, 'Contents', 'MacOS', executableName)
|
||||
} else if (process.platform === 'win32') {
|
||||
nodeBundledInElectronPath = path.join(packagedAppPath, 'atom.exe')
|
||||
|
||||
@@ -114,7 +114,7 @@ function buildAsarUnpackGlobExpression () {
|
||||
|
||||
function getAppName () {
|
||||
if (process.platform === 'darwin') {
|
||||
return CONFIG.channelDisplayName ? `Atom ${CONFIG.channelDisplayName}` : 'Atom'
|
||||
return CONFIG.appName
|
||||
} else {
|
||||
return 'atom'
|
||||
}
|
||||
@@ -169,8 +169,7 @@ function renamePackagedAppDir (packageOutputDirPath) {
|
||||
if (fs.existsSync(packagedAppPath)) fs.removeSync(packagedAppPath)
|
||||
fs.renameSync(packageOutputDirPath, packagedAppPath)
|
||||
} else {
|
||||
const appName = CONFIG.channel !== 'stable' ? `Atom ${CONFIG.channelDisplayName}` : 'Atom'
|
||||
packagedAppPath = path.join(CONFIG.buildOutputPath, appName)
|
||||
packagedAppPath = path.join(CONFIG.buildOutputPath, CONFIG.appName)
|
||||
if (process.platform === 'win32' && process.arch !== 'ia32') {
|
||||
packagedAppPath += ` ${process.arch}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user