diff --git a/BUILD.gn b/BUILD.gn index 53c6c5fa1..16b0cde56 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -687,7 +687,7 @@ if (is_mac) { electron_version = read_file("ELECTRON_VERSION", "trim string") extra_substitutions = [ - "ATOM_BUNDLE_ID=$electron_mac_bundle_id.framework", + "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.framework", "ELECTRON_VERSION=$electron_version", ] @@ -738,7 +738,8 @@ if (is_mac) { sources += [ "atom/common/atom_constants.cc" ] include_dirs = [ "." ] info_plist = "atom/renderer/resources/mac/Info.plist" - extra_substitutions = [ "ATOM_BUNDLE_ID=$electron_mac_bundle_id.helper" ] + extra_substitutions = + [ "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.helper" ] ldflags = [ "-rpath", "@executable_path/../../..", @@ -779,7 +780,7 @@ if (is_mac) { libs = [ "AppKit.framework" ] info_plist = "atom/app/resources/mac/loginhelper-Info.plist" extra_substitutions = - [ "ATOM_BUNDLE_ID=$electron_mac_bundle_id.loginhelper" ] + [ "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id.loginhelper" ] } bundle_data("electron_login_helper_app") { @@ -851,7 +852,11 @@ if (is_mac) { deps += [ ":electron_login_helper_app" ] } info_plist = "atom/browser/resources/mac/Info.plist" - extra_substitutions = [ "ATOM_BUNDLE_ID=$electron_mac_bundle_id" ] + electron_version = read_file("ELECTRON_VERSION", "trim string") + extra_substitutions = [ + "ELECTRON_BUNDLE_ID=$electron_mac_bundle_id", + "ELECTRON_VERSION=$electron_version", + ] ldflags = [ "-rpath", "@executable_path/../Frameworks", diff --git a/atom/app/resources/mac/loginhelper-Info.plist b/atom/app/resources/mac/loginhelper-Info.plist index 68348d27a..7a344988c 100644 --- a/atom/app/resources/mac/loginhelper-Info.plist +++ b/atom/app/resources/mac/loginhelper-Info.plist @@ -3,7 +3,7 @@ CFBundleIdentifier - ${ATOM_BUNDLE_ID} + ${ELECTRON_BUNDLE_ID} CFBundleName ${PRODUCT_NAME} CFBundleExecutable diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index 9b72cf816..a1ad54208 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${PRODUCT_NAME} CFBundleIdentifier - ${ATOM_BUNDLE_ID} + ${ELECTRON_BUNDLE_ID} CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -17,9 +17,9 @@ CFBundleIconFile electron.icns CFBundleVersion - 7.0.0-nightly.20190616 + ${ELECTRON_VERSION} CFBundleShortVersionString - 7.0.0-nightly.20190616 + ${ELECTRON_VERSION} LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/atom/common/resources/mac/Info.plist b/atom/common/resources/mac/Info.plist index 26abfe04c..1d5855340 100644 --- a/atom/common/resources/mac/Info.plist +++ b/atom/common/resources/mac/Info.plist @@ -3,7 +3,7 @@ CFBundleIdentifier - ${ATOM_BUNDLE_ID} + ${ELECTRON_BUNDLE_ID} CFBundleName ${PRODUCT_NAME} CFBundleExecutable diff --git a/atom/renderer/resources/mac/Info.plist b/atom/renderer/resources/mac/Info.plist index 1da2c29fd..2d39d2a98 100644 --- a/atom/renderer/resources/mac/Info.plist +++ b/atom/renderer/resources/mac/Info.plist @@ -3,7 +3,7 @@ CFBundleIdentifier - ${ATOM_BUNDLE_ID} + ${ELECTRON_BUNDLE_ID} CFBundleName ${PRODUCT_NAME} CFBundlePackageType diff --git a/script/bump-version.js b/script/bump-version.js index ae1a87607..5d08adf0b 100644 --- a/script/bump-version.js +++ b/script/bump-version.js @@ -56,7 +56,6 @@ async function main () { // update all version-related files await Promise.all([ updateVersion(version), - updateInfoPlist(version), updatePackageJSON(version), updateVersionH(components), updateWinRC(components) @@ -119,18 +118,6 @@ async function updatePackageJSON (version) { }) } -// update CFBundle version information and overwrite pre-existing file -// TODO(codebytere): provide these version fields at GN build time -async function updateInfoPlist (version) { - const filePath = path.resolve(__dirname, '..', 'atom', 'browser', 'resources', 'mac', 'Info.plist') - const file = plist.parse(await readFile(filePath, { encoding: 'utf8' })) - - file.CFBundleVersion = version - file.CFBundleShortVersionString = version - - await writeFile(filePath, plist.build(file)) -} - // push bump commit to release branch async function commitVersionBump (version) { const gitDir = path.resolve(__dirname, '..')