Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add electron version to framework #14296

Merged
merged 2 commits into from Aug 29, 2018

Conversation

groundwater
Copy link
Contributor

@groundwater groundwater commented Aug 24, 2018

Description of Change

Beginning with MacOS, we don't have an easy way to extract the Electron version from an application build. This can be handy for bulk scanning apps to determine if they're using a version of Electron with any exploits, and either remove, disable, update those apps.

Checklist
  • PR description included and stakeholders cc'd
  • npm test passes
  • PR title follows semantic commit guidelines
Release Notes

Notes: Add Version key to Electron Framework bundle's Info.plist

@groundwater groundwater requested a review from a team August 24, 2018 17:24
BUILD.gn Outdated
# the geolocation responses. Disable it if you
# need to test with chromium's location provider.
# Should not be enabled for release build.
enable_fake_location_provider = !is_official_build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an accidental change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yah, I was tracking another branch because originally the gn changes weren't in master yet. I'll update.

@groundwater groundwater changed the title Add electron version to framework feat: Add electron version to framework Aug 24, 2018
Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe CFBundleVersion from atom/browser/resources/mac/Info.plist already solves this ?

@ckerr ckerr added enhancement ✨ semver/minor backwards-compatible functionality labels Aug 24, 2018
@groundwater
Copy link
Contributor Author

@deepak1556 where does that get copied to?

@deepak1556
Copy link
Member

Info.plist under the app Contents folder.

@groundwater
Copy link
Contributor Author

@deepak1556 at least in the case for Slack, and VS Code those Info.plist files are replaced on distribution. If we place it into the framework, we can separate the version of Electron from the version of the app being distributed.

Should I rename it CFBundleVersion?

@malept
Copy link
Member

malept commented Aug 24, 2018

at least in the case for Slack, and VS Code those Info.plist files are replaced on distribution.

Confirmed, Electron Packager replaces Content/Info.plist's CFBundleVersion with either the build version or the app version (depending on what's defined):

https://github.com/electron-userland/electron-packager/blob/a49c08de260e3d81c928608e08ba4d2a7d65f425/mac.js#L195-L201

@deepak1556
Copy link
Member

@groundwater @malept Thanks for the clarification!

Should I rename it CFBundleVersion?

Yup that should be good.

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can you update the file with gn format to fix style issues. Not a blocker for merging. Thanks!

@codebytere codebytere merged commit d9a7fee into master Aug 29, 2018
@release-clerk
Copy link

release-clerk bot commented Aug 29, 2018

Release Notes Persisted

Add Version key to Electron Framework bundle's Info.plist

@codebytere codebytere deleted the groundwater/framework-version branch August 29, 2018 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants