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

Set Electron version within the build process environment #18946

Merged
merged 1 commit into from Mar 6, 2019

Conversation

Projects
None yet
1 participant
@smashwilson
Copy link
Member

smashwilson commented Mar 6, 2019

Requirements for Adding, Changing, or Removing a Feature

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must contribute a change that has been endorsed by the maintainer team. See details in the template below.
  • The pull request must update the test suite to exercise the updated functionality. For guidance, please see https://flight-manual.atom.io/hacking-atom/sections/writing-specs/.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see https://github.com/atom/atom/tree/master/CONTRIBUTING.md#pull-requests.

Issue or RFC Endorsed by Atom's Maintainers

This is follow-on work from atom/github#1982.

Description of the Change

Populate the ELECTRON_VERSION environment variable with the current Electron version for the script/build process and its child processes.

When we upgraded to Babel 7 in atom/github, we changed our Babel configuration to target the current Electron version as read from process.versions.electron. Unfortunately, the Atom build script runs bundled package transpilers in a Node process instead, so this is undefined when we try to build Atom. Setting the environment variable gives us an alternative way to transpile correctly.

Alternate Designs

Another option is to ensure than an Electron process is used to transpile bundled packages. That sounded like a lot more work, though.

Possible Drawbacks

N/A

Verification Process

We ran Atom's script/build with atom/github@0.27.1, which includes atom/github@75f5c26, and were able to transpile successfully.

Release Notes

N/A

cc @vanessayuenn

@smashwilson smashwilson merged commit 401a5a7 into master Mar 6, 2019

3 checks passed

Atom Pull Requests #20190306.1 succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@smashwilson smashwilson deleted the aw/electron-version-in-build-env branch Mar 6, 2019

annthurium added a commit that referenced this pull request Mar 11, 2019

Merge pull request #18946 from atom/aw/electron-version-in-build-env
Set Electron version within the build process environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.