From 4422306fd80fecf0593647044304ff830f1ea3ae Mon Sep 17 00:00:00 2001 From: Spiker985 Date: Tue, 16 Aug 2022 18:03:08 -0400 Subject: [PATCH] Update packaging scripts - A[a]tom -> P[p]ulsar --- script/lib/clean-caches.js | 6 +-- script/lib/compress-artifacts.js | 8 +-- script/lib/copy-assets.js | 6 +-- script/lib/create-debian-package.js | 38 +++++++------- script/lib/create-rpm-package.js | 36 ++++++------- script/lib/create-windows-installer.js | 10 ++-- script/lib/download-file-from-github.js | 2 +- script/lib/generate-api-docs.js | 2 +- script/lib/generate-metadata.js | 2 +- script/lib/install-application.js | 52 +++++++++---------- script/lib/kill-running-atom-instances.js | 2 +- script/lib/lint-coffee-script-paths.js | 2 +- script/lib/notarize-on-mac.js | 2 +- script/lib/package-application.js | 42 ++++++++------- script/lib/run-apm-install.js | 2 +- ...e-packages-with-custom-transpiler-paths.js | 2 +- script/lib/update-dependency/git.js | 1 + script/lib/update-dependency/pull-request.js | 6 +-- script/lib/verify-machine-requirements.js | 6 +-- 19 files changed, 115 insertions(+), 112 deletions(-) diff --git a/script/lib/clean-caches.js b/script/lib/clean-caches.js index 52f2d4770..1f38819ca 100644 --- a/script/lib/clean-caches.js +++ b/script/lib/clean-caches.js @@ -15,10 +15,10 @@ module.exports = function() { path.join(CONFIG.atomHomeDirPath, '.npm'), path.join(CONFIG.atomHomeDirPath, 'compile-cache'), path.join(CONFIG.atomHomeDirPath, 'snapshot-cache'), - path.join(CONFIG.atomHomeDirPath, 'atom-shell'), + path.join(CONFIG.atomHomeDirPath, 'pulsar-shell'), path.join(CONFIG.atomHomeDirPath, 'electron'), - path.join(os.tmpdir(), 'atom-build'), - path.join(os.tmpdir(), 'atom-cached-atom-shells') + path.join(os.tmpdir(), 'pulsar-build'), + path.join(os.tmpdir(), 'pulsar-cached-pulsar-shells') ]; const rmPromises = []; for (let path of cachePaths) { diff --git a/script/lib/compress-artifacts.js b/script/lib/compress-artifacts.js index 514d0e4e5..3bb5569eb 100644 --- a/script/lib/compress-artifacts.js +++ b/script/lib/compress-artifacts.js @@ -14,7 +14,7 @@ module.exports = function(packagedAppPath) { if (process.platform === 'darwin') { const symbolsArchivePath = path.join( CONFIG.buildOutputPath, - 'atom-mac-symbols.zip' + 'pulsar-mac-symbols.zip' ); compress(CONFIG.symbolsPath, symbolsArchivePath); } @@ -23,11 +23,11 @@ module.exports = function(packagedAppPath) { function getArchiveName() { switch (process.platform) { case 'darwin': - return 'atom-mac.zip'; + return 'pulsar-mac.zip'; case 'win32': - return `atom-${process.arch === 'x64' ? 'x64-' : ''}windows.zip`; + return `pulsar-${process.arch === 'x64' ? 'x64-' : ''}windows.zip`; default: - return `atom-${getLinuxArchiveArch()}.tar.gz`; + return `pulsar-${getLinuxArchiveArch()}.tar.gz`; } } diff --git a/script/lib/copy-assets.js b/script/lib/copy-assets.js index 1bf841d6b..129b6f517 100644 --- a/script/lib/copy-assets.js +++ b/script/lib/copy-assets.js @@ -13,7 +13,7 @@ module.exports = function() { console.log(`Copying assets to ${CONFIG.intermediateAppPath}`); let srcPaths = [ path.join(CONFIG.repositoryRootPath, 'benchmarks', 'benchmark-runner.js'), - path.join(CONFIG.repositoryRootPath, 'dot-atom'), + path.join(CONFIG.repositoryRootPath, 'templates'), path.join(CONFIG.repositoryRootPath, 'exports'), path.join(CONFIG.repositoryRootPath, 'package.json'), path.join(CONFIG.repositoryRootPath, 'static'), @@ -39,7 +39,7 @@ module.exports = function() { // We do this to ensure that symlinked repo-local bundled packages get // copied to the output folder correctly. We dereference only the top-level // symlinks and not nested symlinks to avoid issues where symlinked binaries - // are duplicated in Atom's installation packages (see atom/atom#18490). + // are duplicated in Pulsar's installation packages (see atom/atom#18490). const nodeModulesPath = path.join(CONFIG.repositoryRootPath, 'node_modules'); glob .sync(path.join(nodeModulesPath, '*')) @@ -69,7 +69,7 @@ module.exports = function() { 'png', '1024.png' ), - path.join(CONFIG.intermediateAppPath, 'resources', 'atom.png') + path.join(CONFIG.intermediateAppPath, 'resources', 'pulsar.png') ) ); diff --git a/script/lib/create-debian-package.js b/script/lib/create-debian-package.js index 4c13c26a5..5d80d154a 100644 --- a/script/lib/create-debian-package.js +++ b/script/lib/create-debian-package.js @@ -10,9 +10,9 @@ const CONFIG = require('../config'); module.exports = function(packagedAppPath) { console.log(`Creating Debian package for "${packagedAppPath}"`); - const atomExecutableName = - CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`; - const apmExecutableName = + const editorExecutableName = + CONFIG.channel === 'stable' ? 'pulsar' : `pulsar-${CONFIG.channel}`; + const pkgMgrExecutableName = CONFIG.channel === 'stable' ? 'apm' : `apm-${CONFIG.channel}`; const appDescription = CONFIG.appMetadata.description; const appVersion = CONFIG.appMetadata.version; @@ -29,7 +29,7 @@ module.exports = function(packagedAppPath) { const outputDebianPackageFilePath = path.join( CONFIG.buildOutputPath, - `atom-${arch}.deb` + `pulsar-${arch}.deb` ); const debianPackageDirPath = path.join( os.tmpdir(), @@ -44,7 +44,7 @@ module.exports = function(packagedAppPath) { ); const debianPackageAtomDirPath = path.join( debianPackageShareDirPath, - atomExecutableName + editorExecutableName ); const debianPackageApplicationsDirPath = path.join( debianPackageShareDirPath, @@ -57,7 +57,7 @@ module.exports = function(packagedAppPath) { const debianPackageDocsDirPath = path.join( debianPackageShareDirPath, 'doc', - atomExecutableName + editorExecutableName ); if (fs.existsSync(debianPackageDirPath)) { @@ -97,14 +97,14 @@ module.exports = function(packagedAppPath) { console.log(`Copying binaries into "${debianPackageBinDirPath}"`); fs.copySync( - path.join(CONFIG.repositoryRootPath, 'atom.sh'), - path.join(debianPackageBinDirPath, atomExecutableName) + path.join(CONFIG.repositoryRootPath, 'pulsar.sh'), + path.join(debianPackageBinDirPath, editorExecutableName) ); fs.symlinkSync( path.join( '..', 'share', - atomExecutableName, + editorExecutableName, 'resources', 'app', 'apm', @@ -112,7 +112,7 @@ module.exports = function(packagedAppPath) { '.bin', 'apm' ), - path.join(debianPackageBinDirPath, apmExecutableName) + path.join(debianPackageBinDirPath, pkgMgrExecutableName) ); fs.chmodSync(path.join(debianPackageAtomDirPath, 'chrome-sandbox'), '4755'); @@ -131,7 +131,7 @@ module.exports = function(packagedAppPath) { ) ); const controlFileContents = template(controlFileTemplate)({ - appFileName: atomExecutableName, + appFileName: editorExecutableName, version: appVersion, arch: arch, installedSize: packageSizeInKilobytes, @@ -150,20 +150,20 @@ module.exports = function(packagedAppPath) { CONFIG.repositoryRootPath, 'resources', 'linux', - 'atom.desktop.in' + 'pulsar.desktop.in' ) ); const desktopEntryContents = template(desktopEntryTemplate)({ appName: CONFIG.appName, - appFileName: atomExecutableName, + appFileName: editorExecutableName, description: appDescription, installDir: '/usr', - iconPath: atomExecutableName + iconPath: editorExecutableName }); fs.writeFileSync( path.join( debianPackageApplicationsDirPath, - `${atomExecutableName}.desktop` + `${editorExecutableName}.desktop` ), desktopEntryContents ); @@ -175,9 +175,9 @@ module.exports = function(packagedAppPath) { 'resources', 'app.asar.unpacked', 'resources', - 'atom.png' + 'pulsar.png' ), - path.join(debianPackageIconsDirPath, `${atomExecutableName}.png`) + path.join(debianPackageIconsDirPath, `${editorExecutableName}.png`) ); console.log(`Copying license into "${debianPackageDocsDirPath}"`); @@ -190,12 +190,12 @@ module.exports = function(packagedAppPath) { `Copying polkit configuration into "${debianPackageShareDirPath}"` ); fs.copySync( - path.join(CONFIG.repositoryRootPath, 'resources', 'linux', 'atom.policy'), + path.join(CONFIG.repositoryRootPath, 'resources', 'linux', 'pulsar.policy'), path.join( debianPackageShareDirPath, 'polkit-1', 'actions', - `atom-${CONFIG.channel}.policy` + `pulsar-${CONFIG.channel}.policy` ) ); diff --git a/script/lib/create-rpm-package.js b/script/lib/create-rpm-package.js index a8bd143dd..69b3d60d3 100644 --- a/script/lib/create-rpm-package.js +++ b/script/lib/create-rpm-package.js @@ -10,16 +10,16 @@ const CONFIG = require('../config'); module.exports = function(packagedAppPath) { console.log(`Creating rpm package for "${packagedAppPath}"`); - const atomExecutableName = - CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`; - const apmExecutableName = + const editorExecutableName = + CONFIG.channel === 'stable' ? 'pulsar' : `pulsar-${CONFIG.channel}`; + const pkgMgrExecutableName = CONFIG.channel === 'stable' ? 'apm' : `apm-${CONFIG.channel}`; 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) const appVersion = CONFIG.appMetadata.version.replace(/-/g, '.'); - const policyFileName = `atom-${CONFIG.channel}.policy`; + const policyFileName = `pulsar-${CONFIG.channel}.policy`; const rpmPackageDirPath = path.join(CONFIG.homeDirPath, 'rpmbuild'); const rpmPackageBuildDirPath = path.join(rpmPackageDirPath, 'BUILD'); @@ -65,20 +65,20 @@ module.exports = function(packagedAppPath) { ); console.log(`Writing rpm package spec file into "${rpmPackageSpecsDirPath}"`); - const rpmPackageSpecFilePath = path.join(rpmPackageSpecsDirPath, 'atom.spec'); + const rpmPackageSpecFilePath = path.join(rpmPackageSpecsDirPath, 'pulsar.spec'); const rpmPackageSpecsTemplate = fs.readFileSync( path.join( CONFIG.repositoryRootPath, 'resources', 'linux', 'redhat', - 'atom.spec.in' + 'pulsar.spec.in' ) ); const rpmPackageSpecsContents = template(rpmPackageSpecsTemplate)({ appName: appName, - appFileName: atomExecutableName, - apmFileName: apmExecutableName, + appFileName: editorExecutableName, + apmFileName: pkgMgrExecutableName, description: appDescription, installDir: '/usr', version: appVersion, @@ -92,30 +92,30 @@ module.exports = function(packagedAppPath) { CONFIG.repositoryRootPath, 'resources', 'linux', - 'atom.desktop.in' + 'pulsar.desktop.in' ) ); const desktopEntryContents = template(desktopEntryTemplate)({ appName: appName, - appFileName: atomExecutableName, + appFileName: editorExecutableName, description: appDescription, installDir: '/usr', - iconPath: atomExecutableName + iconPath: editorExecutableName }); fs.writeFileSync( - path.join(rpmPackageBuildDirPath, `${atomExecutableName}.desktop`), + path.join(rpmPackageBuildDirPath, `${editorExecutableName}.desktop`), desktopEntryContents ); - console.log(`Copying atom.sh into "${rpmPackageBuildDirPath}"`); + console.log(`Copying pulsar.sh into "${rpmPackageBuildDirPath}"`); fs.copySync( - path.join(CONFIG.repositoryRootPath, 'atom.sh'), - path.join(rpmPackageBuildDirPath, 'atom.sh') + path.join(CONFIG.repositoryRootPath, 'pulsar.sh'), + path.join(rpmPackageBuildDirPath, 'pulsar.sh') ); - console.log(`Copying atom.policy into "${rpmPackageBuildDirPath}"`); + console.log(`Copying pulsar.policy into "${rpmPackageBuildDirPath}"`); fs.copySync( - path.join(CONFIG.repositoryRootPath, 'resources', 'linux', 'atom.policy'), + path.join(CONFIG.repositoryRootPath, 'resources', 'linux', 'pulsar.policy'), path.join(rpmPackageBuildDirPath, policyFileName) ); @@ -137,7 +137,7 @@ module.exports = function(packagedAppPath) { ); const outputRpmPackageFilePath = path.join( CONFIG.buildOutputPath, - `atom.${generatedArch}.rpm` + `pulsar.${generatedArch}.rpm` ); console.log( `Copying "${generatedPackageFilePath}" into "${outputRpmPackageFilePath}"` diff --git a/script/lib/create-windows-installer.js b/script/lib/create-windows-installer.js index 9f28c71a5..17aae605f 100644 --- a/script/lib/create-windows-installer.js +++ b/script/lib/create-windows-installer.js @@ -20,7 +20,7 @@ module.exports = packagedAppPath => { authors: 'GitHub Inc.', iconUrl: `https://raw.githubusercontent.com/${REPO_OWNER}/${MAIN_REPO}/master/resources/app-icons/${ CONFIG.channel - }/atom.ico`, + }/pulsar.ico`, loadingGif: path.join( CONFIG.repositoryRootPath, 'resources', @@ -32,13 +32,13 @@ module.exports = packagedAppPath => { remoteReleases: `${updateUrlPrefix}/api/updates${archSuffix}?version=${ CONFIG.computedAppVersion }`, - setupExe: `AtomSetup${process.arch === 'x64' ? '-x64' : ''}.exe`, + setupExe: `PulsarSetup${process.arch === 'x64' ? '-x64' : ''}.exe`, setupIcon: path.join( CONFIG.repositoryRootPath, 'resources', 'app-icons', CONFIG.channel, - 'atom.ico' + 'pulsar.ico' ) }; @@ -49,7 +49,7 @@ module.exports = packagedAppPath => { } let appName = - CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`; + CONFIG.channel === 'stable' ? 'pulsar' : `pulsar-${CONFIG.channel}`; for (let nupkgPath of glob.sync( `${CONFIG.buildOutputPath}/${appName}-*.nupkg` )) { @@ -60,7 +60,7 @@ module.exports = packagedAppPath => { fs.unlinkSync(nupkgPath); } else { if (process.arch === 'x64') { - // Use the original .nupkg filename to generate the `atom-x64` name by inserting `-x64` after `atom` + // Use the original .nupkg filename to generate the `pulsar-x64` name by inserting `-x64` after `pulsar` const newNupkgPath = nupkgPath.replace( `${appName}-`, `${appName}-x64-` diff --git a/script/lib/download-file-from-github.js b/script/lib/download-file-from-github.js index 1e58e63f4..6196a201e 100644 --- a/script/lib/download-file-from-github.js +++ b/script/lib/download-file-from-github.js @@ -9,7 +9,7 @@ module.exports = function(downloadURL, destinationPath) { const response = syncRequest('GET', downloadURL, { headers: { Accept: 'application/vnd.github.v3.raw', - 'User-Agent': 'Atom Build', + 'User-Agent': 'Pulsar Build', Authorization: `token ${process.env.GITHUB_TOKEN}` } }); diff --git a/script/lib/generate-api-docs.js b/script/lib/generate-api-docs.js index ad39bea7d..1303a093b 100644 --- a/script/lib/generate-api-docs.js +++ b/script/lib/generate-api-docs.js @@ -10,7 +10,7 @@ const path = require('path'); const CONFIG = require('../config'); module.exports = function() { - const generatedJSONPath = path.join(CONFIG.docsOutputPath, 'atom-api.json'); + const generatedJSONPath = path.join(CONFIG.docsOutputPath, 'pulsar-api.json'); console.log(`Generating API docs at ${generatedJSONPath}`); // Unfortunately, correct relative paths depend on a specific working diff --git a/script/lib/generate-metadata.js b/script/lib/generate-metadata.js index c174a6e26..475d94f72 100644 --- a/script/lib/generate-metadata.js +++ b/script/lib/generate-metadata.js @@ -13,7 +13,7 @@ let appName = CONFIG.appMetadata.name; if (process.platform === 'win32') { // Use the channel name in the app name on Windows so that the installer will // place it in a different folder in AppData\Local - appName = CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`; + appName = CONFIG.channel === 'stable' ? 'pulsar' : `pulsar-${CONFIG.channel}`; } module.exports = function() { diff --git a/script/lib/install-application.js b/script/lib/install-application.js index f6edded67..951bb51bc 100644 --- a/script/lib/install-application.js +++ b/script/lib/install-application.js @@ -76,19 +76,19 @@ module.exports = function(packagedAppPath, installDir) { }); } } else { - const atomExecutableName = - CONFIG.channel === 'stable' ? 'atom' : 'atom-' + CONFIG.channel; - const apmExecutableName = + const editorExecutableName = + CONFIG.channel === 'stable' ? 'pulsar' : 'pulsar-' + CONFIG.channel; + const pkgMgrExecutableName = CONFIG.channel === 'stable' ? 'apm' : 'apm-' + CONFIG.channel; const appName = CONFIG.channel === 'stable' - ? 'Atom' - : startCase('Atom ' + CONFIG.channel); + ? 'Pulsar' + : startCase('Pulsar ' + CONFIG.channel); const appDescription = CONFIG.appMetadata.description; const prefixDirPath = installDir !== '' ? handleTilde(installDir) : path.join('/usr', 'local'); const shareDirPath = path.join(prefixDirPath, 'share'); - const installationDirPath = path.join(shareDirPath, atomExecutableName); + const installationDirPath = path.join(shareDirPath, editorExecutableName); const applicationsDirPath = path.join(shareDirPath, 'applications'); const binDirPath = path.join(prefixDirPath, 'bin'); @@ -101,7 +101,7 @@ module.exports = function(packagedAppPath, installDir) { { // Install icons const baseIconThemeDirPath = findBaseIconThemeDirPath(); - const fullIconName = atomExecutableName + '.png'; + const fullIconName = editorExecutableName + '.png'; let existingIconsFound = false; fs.readdirSync(baseIconThemeDirPath).forEach(size => { @@ -156,7 +156,7 @@ module.exports = function(packagedAppPath, installDir) { // Install xdg desktop file const desktopEntryPath = path.join( applicationsDirPath, - `${atomExecutableName}.desktop` + `${editorExecutableName}.desktop` ); if (fs.existsSync(desktopEntryPath)) { console.log( @@ -170,51 +170,51 @@ module.exports = function(packagedAppPath, installDir) { CONFIG.repositoryRootPath, 'resources', 'linux', - 'atom.desktop.in' + 'pulsar.desktop.in' ) ); const desktopEntryContents = template(desktopEntryTemplate)({ appName, - appFileName: atomExecutableName, + appFileName: editorExecutableName, description: appDescription, installDir: prefixDirPath, - iconPath: atomExecutableName + iconPath: editorExecutableName }); fs.writeFileSync(desktopEntryPath, desktopEntryContents); } { - // Add atom executable to the PATH - const atomBinDestinationPath = path.join(binDirPath, atomExecutableName); - if (fs.existsSync(atomBinDestinationPath)) { + // Add pulsar executable to the PATH + const editorBinDestinationPath = path.join(binDirPath, editorExecutableName); + if (fs.existsSync(editorBinDestinationPath)) { console.log( - `Removing existing executable at "${atomBinDestinationPath}"` + `Removing existing executable at "${editorBinDestinationPath}"` ); - fs.removeSync(atomBinDestinationPath); + fs.removeSync(editorBinDestinationPath); } - console.log(`Copying atom.sh to "${atomBinDestinationPath}"`); + console.log(`Copying pulsar.sh to "${editorBinDestinationPath}"`); fs.copySync( - path.join(CONFIG.repositoryRootPath, 'atom.sh'), - atomBinDestinationPath + path.join(CONFIG.repositoryRootPath, 'pulsar.sh'), + editorBinDestinationPath ); } { // Link apm executable to the PATH - const apmBinDestinationPath = path.join(binDirPath, apmExecutableName); + const pkgMgrBinDestinationPath = path.join(binDirPath, pkgMgrExecutableName); try { - fs.lstatSync(apmBinDestinationPath); + fs.lstatSync(pkgMgrBinDestinationPath); console.log( - `Removing existing executable at "${apmBinDestinationPath}"` + `Removing existing executable at "${pkgMgrBinDestinationPath}"` ); - fs.removeSync(apmBinDestinationPath); + fs.removeSync(pkgMgrBinDestinationPath); } catch (e) {} - console.log(`Symlinking apm to "${apmBinDestinationPath}"`); + console.log(`Symlinking apm to "${pkgMgrBinDestinationPath}"`); fs.symlinkSync( path.join( '..', 'share', - atomExecutableName, + editorExecutableName, 'resources', 'app', 'apm', @@ -222,7 +222,7 @@ module.exports = function(packagedAppPath, installDir) { '.bin', 'apm' ), - apmBinDestinationPath + pkgMgrBinDestinationPath ); } diff --git a/script/lib/kill-running-atom-instances.js b/script/lib/kill-running-atom-instances.js index 6b35f4f0e..3092fd87f 100644 --- a/script/lib/kill-running-atom-instances.js +++ b/script/lib/kill-running-atom-instances.js @@ -4,7 +4,7 @@ const CONFIG = require('../config.js'); module.exports = function() { if (process.platform === 'win32') { - // Use START as a way to ignore error if Atom.exe isnt running + // Use START as a way to ignore error if Pulsar.exe isnt running childProcess.execSync(`START taskkill /F /IM ${CONFIG.executableName}`); } else { childProcess.execSync(`pkill -9 ${CONFIG.appMetadata.productName} || true`); diff --git a/script/lib/lint-coffee-script-paths.js b/script/lib/lint-coffee-script-paths.js index fe53d31a0..a6c1c0f46 100644 --- a/script/lib/lint-coffee-script-paths.js +++ b/script/lib/lint-coffee-script-paths.js @@ -9,7 +9,7 @@ const CONFIG = require('../config'); module.exports = function() { const globPathsToLint = [ - path.join(CONFIG.repositoryRootPath, 'dot-atom/**/*.coffee'), + path.join(CONFIG.repositoryRootPath, 'templates/**/*.coffee'), path.join(CONFIG.repositoryRootPath, 'src/**/*.coffee'), path.join(CONFIG.repositoryRootPath, 'spec/*.coffee') ]; diff --git a/script/lib/notarize-on-mac.js b/script/lib/notarize-on-mac.js index 26f4d6cb7..65462659f 100644 --- a/script/lib/notarize-on-mac.js +++ b/script/lib/notarize-on-mac.js @@ -1,7 +1,7 @@ const notarize = require('electron-notarize').notarize; module.exports = async function(packagedAppPath) { - const appBundleId = 'com.github.atom'; + const appBundleId = 'com.github.pulsar'; const appleId = process.env.AC_USER; const appleIdPassword = process.env.AC_PASSWORD; console.log(`Notarizing application at ${packagedAppPath}`); diff --git a/script/lib/package-application.js b/script/lib/package-application.js index 420d12ac0..5fe407382 100644 --- a/script/lib/package-application.js +++ b/script/lib/package-application.js @@ -22,7 +22,8 @@ module.exports = function() { } with app name "${appName}"` ); return runPackager({ - appBundleId: 'com.github.atom', + appBundleId: 'com.github.pulsar', + //TODO_PULSAR: Check to see if we should/need to migrate away from GitHub as a CompanyName appCopyright: `Copyright © 2014-${new Date().getFullYear()} GitHub, Inc. All rights reserved.`, appVersion: CONFIG.appMetadata.version, arch: process.platform === 'darwin' ? 'x64' : HOST_ARCH, // OS X is 64-bit only @@ -36,25 +37,26 @@ module.exports = function() { CONFIG.repositoryRootPath, 'resources', 'mac', - 'atom-Info.plist' + 'pulsar-Info.plist' ), - helperBundleId: 'com.github.atom.helper', + helperBundleId: 'com.github.pulsar.helper', icon: path.join( CONFIG.repositoryRootPath, 'resources', 'app-icons', CONFIG.channel, - 'atom' + 'pulsar' ), name: appName, out: CONFIG.buildOutputPath, overwrite: true, platform: process.platform, - // Atom doesn't have devDependencies, but if prune is true, it will delete the non-standard packageDependencies. + // Pulsar doesn't have devDependencies, but if prune is true, it will delete the non-standard packageDependencies. prune: false, win32metadata: { + //TODO_PULSAR: Check to see if we should/need to migrate away from GitHub as a CompanyName CompanyName: 'GitHub, Inc.', - FileDescription: 'Atom', + FileDescription: 'Pulsar', ProductName: CONFIG.appName } }).then(packagedAppPath => { @@ -109,8 +111,8 @@ function copyNonASARResources(packagedAppPath, bundledResourcesPath) { ) ); fs.copySync( - path.join(CONFIG.repositoryRootPath, 'atom.sh'), - path.join(bundledResourcesPath, 'app', 'atom.sh') + path.join(CONFIG.repositoryRootPath, 'pulsar.sh'), + path.join(bundledResourcesPath, 'app', 'pulsar.sh') ); } if (process.platform === 'darwin') { @@ -128,12 +130,12 @@ function copyNonASARResources(packagedAppPath, bundledResourcesPath) { 'png', '1024.png' ), - path.join(packagedAppPath, 'atom.png') + path.join(packagedAppPath, 'pulsar.png') ); } else if (process.platform === 'win32') { [ - 'atom.sh', - 'atom.js', + 'pulsar.sh', + 'pulsar.js', 'apm.cmd', 'apm.sh', 'file.ico', @@ -145,7 +147,7 @@ function copyNonASARResources(packagedAppPath, bundledResourcesPath) { ) ); - // Customize atom.cmd for the channel-specific atom.exe name (e.g. atom-beta.exe) + // Customize pulsar.cmd for the channel-specific pulsar.exe name (e.g. pulsar-beta.exe) generateAtomCmdForChannel(bundledResourcesPath); } @@ -162,11 +164,11 @@ function setAtomHelperVersion(packagedAppPath) { const frameworksPath = path.join(packagedAppPath, 'Contents', 'Frameworks'); const helperPListPath = path.join( frameworksPath, - 'Atom Helper.app', + 'Pulsar Helper.app', 'Contents', 'Info.plist' ); - console.log(`Setting Atom Helper Version for ${helperPListPath}`); + console.log(`Setting Pulsar Helper Version for ${helperPListPath}`); spawnSync('/usr/libexec/PlistBuddy', [ '-c', `Add CFBundleVersion string ${CONFIG.appMetadata.version}`, @@ -197,7 +199,7 @@ function buildAsarUnpackGlobExpression() { path.join('**', 'node_modules', 'dugite', 'git', '**'), path.join('**', 'node_modules', 'github', 'bin', '**'), path.join('**', 'node_modules', 'vscode-ripgrep', 'bin', '**'), - path.join('**', 'resources', 'atom.png') + path.join('**', 'resources', 'pulsar.png') ]; return `{${unpack.join(',')}}`; @@ -207,9 +209,9 @@ function getAppName() { if (process.platform === 'darwin') { return CONFIG.appName; } else if (process.platform === 'win32') { - return CONFIG.channel === 'stable' ? 'atom' : `atom-${CONFIG.channel}`; + return CONFIG.channel === 'stable' ? 'pulsar' : `pulsar-${CONFIG.channel}`; } else { - return 'atom'; + return 'pulsar'; } } @@ -236,7 +238,7 @@ function renamePackagedAppDir(packageOutputDirPath) { ); } else if (process.platform === 'linux') { const appName = - CONFIG.channel !== 'stable' ? `atom-${CONFIG.channel}` : 'atom'; + CONFIG.channel !== 'stable' ? `pulsar-${CONFIG.channel}` : 'pulsar'; let architecture; if (HOST_ARCH === 'ia32') { architecture = 'i386'; @@ -264,13 +266,13 @@ function renamePackagedAppDir(packageOutputDirPath) { function generateAtomCmdForChannel(bundledResourcesPath) { const atomCmdTemplate = fs.readFileSync( - path.join(CONFIG.repositoryRootPath, 'resources', 'win', 'atom.cmd') + path.join(CONFIG.repositoryRootPath, 'resources', 'win', 'pulsar.cmd') ); const atomCmdContents = template(atomCmdTemplate)({ atomExeName: CONFIG.executableName }); fs.writeFileSync( - path.join(bundledResourcesPath, 'cli', 'atom.cmd'), + path.join(bundledResourcesPath, 'cli', 'pulsar.cmd'), atomCmdContents ); } diff --git a/script/lib/run-apm-install.js b/script/lib/run-apm-install.js index f582ff471..987914cbb 100644 --- a/script/lib/run-apm-install.js +++ b/script/lib/run-apm-install.js @@ -6,7 +6,7 @@ const CONFIG = require('../config'); module.exports = function(packagePath, ci, stdioOptions) { const installEnv = Object.assign({}, process.env); - // Set resource path so that apm can load metadata related to Atom. + // Set resource path so that apm can load metadata related to Pulsar. installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath; childProcess.execFileSync(CONFIG.getApmBinPath(), [ci ? 'ci' : 'install'], { diff --git a/script/lib/transpile-packages-with-custom-transpiler-paths.js b/script/lib/transpile-packages-with-custom-transpiler-paths.js index 1b7e77ac6..6b1e86872 100644 --- a/script/lib/transpile-packages-with-custom-transpiler-paths.js +++ b/script/lib/transpile-packages-with-custom-transpiler-paths.js @@ -64,7 +64,7 @@ function transpilePackagesWithCustomTranspilerPaths() { pathsToCompile.forEach(transpilePath); } - // Now that we've transpiled everything in-place, we no longer want Atom to try to transpile + // Now that we've transpiled everything in-place, we no longer want Pulsar to try to transpile // the same files when they're being required. delete metadata.atomTranspilers; fs.writeFileSync( diff --git a/script/lib/update-dependency/git.js b/script/lib/update-dependency/git.js index f38dce795..92dbfc26c 100644 --- a/script/lib/update-dependency/git.js +++ b/script/lib/update-dependency/git.js @@ -8,6 +8,7 @@ const git = (git, repositoryRootPath) => { 'package-lock.json' ); try { + //TODO_PULSAR: Update remotes git.getRemotes((err, remotes) => { if (!err && !remotes.map(({ name }) => name).includes('ATOM')) { git.addRemote( diff --git a/script/lib/update-dependency/pull-request.js b/script/lib/update-dependency/pull-request.js index 66735d97d..6399d8bca 100644 --- a/script/lib/update-dependency/pull-request.js +++ b/script/lib/update-dependency/pull-request.js @@ -4,7 +4,7 @@ const { REPO_OWNER, MAIN_REPO } = require('../../config'); const requestWithAuth = request.defaults({ baseUrl: 'https://api.github.com', headers: { - 'user-agent': 'atom', + 'user-agent': 'pulsar', authorization: `token ${process.env.AUTH_TOKEN}` }, owner: REPO_OWNER, @@ -18,7 +18,7 @@ module.exports = { ) => { let description = `Bumps ${moduleName} from ${installed} to ${latest}`; if (isCorePackage) { - description = `*List of changes between ${moduleName}@${installed} and ${moduleName}@${latest}: https://github.com/atom/${moduleName}/compare/v${installed}...v${latest}*`; + description = `*List of changes between ${moduleName}@${installed} and ${moduleName}@${latest}: https://github.com/pulsar-edit/${moduleName}/compare/v${installed}...v${latest}*`; } return requestWithAuth('POST /repos/:owner/:repo/pulls', { title: `⬆️ ${moduleName}@${latest}`, @@ -34,7 +34,7 @@ module.exports = { }, findOpenPRs: async () => { return requestWithAuth('GET /search/issues', { - q: 'type:pr repo:atom/atom state:open label:"depency ⬆️"' + q: 'type:pr repo:pulsar-edit/pulsar state:open label:"depency ⬆️"' }); }, checkCIstatus: async ({ ref }) => { diff --git a/script/lib/verify-machine-requirements.js b/script/lib/verify-machine-requirements.js index afac015d5..2df4d33e9 100644 --- a/script/lib/verify-machine-requirements.js +++ b/script/lib/verify-machine-requirements.js @@ -16,7 +16,7 @@ function verifyNode() { console.log(`Node:\tv${fullVersion}`); } else { throw new Error( - `node v10.12+ is required to build Atom. node v${fullVersion} is installed.` + `node v10.12+ is required to build Pulsar. node v${fullVersion} is installed.` ); } } @@ -110,7 +110,7 @@ function verifyPython() { throw new Error( `NODE_GYP_FORCE_PYTHON is set to: "${binary}", but this is not a valid Python.\n` + 'Please set NODE_GYP_FORCE_PYTHON to something valid, or unset it entirely.\n' + - '(Python 2.6, 2.7 or 3.5+ is required to build Atom.)\n' + '(Python 2.6, 2.7 or 3.5+ is required to build Pulsar.)\n' ); } } @@ -139,7 +139,7 @@ function verifyPython() { } else { throw new Error( `\n${triedLog}\n` + - 'Python 2.6, 2.7 or 3.5+ is required to build Atom.\n' + + 'Python 2.6, 2.7 or 3.5+ is required to build Pulsar.\n' + 'verify-machine-requirements.js was unable to find such a version of Python.\n' + "Set the PYTHON env var to e.g. 'C:/path/to/Python27/python.exe'\n" + 'if your Python is installed in a non-default location.\n'