refactor: auto generate Info.plist to avoid bumping during releases (#18849)

This commit is contained in:
Samuel Attard 2019-06-17 15:56:15 -07:00 committed by GitHub
parent 0af3548b55
commit ccd15fc12e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 23 deletions

View file

@ -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, '..')