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

fix(package): pass missing user-defined hooks to packager #3123

Merged

Conversation

erikian
Copy link
Member

@erikian erikian commented Dec 26, 2022

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • The changes are appropriately documented (if applicable).
  • The changes have sufficient test coverage (if applicable).
  • The testsuite passes successfully on my local machine (if applicable).

Summarize your changes:

Currently, afterComplete hooks defined in the Forge configuration are not being passed to electron-packager, so the following code has no effect:

const forgeConfig = {
  packagerConfig: {
    afterComplete: [
      async (buildPath, electronVersion, packagedPlatform, packagedArch, done) => {
        // some code...

        done();
      },
    ],
  },
};

The existing tests for hooks cover only Forge-specific hooks, not hooks from electron-packager, so I didn't add any tests.

@erikian erikian marked this pull request as draft December 26, 2022 17:14
@erikian erikian force-pushed the fix/user-defined-aftercomplete-hooks branch from 27dc3c9 to 3fab30b Compare December 26, 2022 17:27
@erikian erikian closed this Dec 26, 2022
@erikian erikian deleted the fix/user-defined-aftercomplete-hooks branch December 26, 2022 17:28
@erikian erikian restored the fix/user-defined-aftercomplete-hooks branch December 26, 2022 17:29
@erikian erikian reopened this Dec 26, 2022
@erikian
Copy link
Member Author

erikian commented Dec 26, 2022

There were other hooks not being passed to packager, so I've added them too

@erikian erikian marked this pull request as ready for review December 26, 2022 17:31
@erikian erikian changed the title fix(package): pass user-defined afterComplete hooks to packager fix(package): pass user-defined hooks to packager Dec 26, 2022
@erickzhao erickzhao requested a review from a team January 3, 2023 20:07
@erikian erikian changed the title fix(package): pass user-defined hooks to packager fix(package): pass missing user-defined hooks to packager Feb 10, 2023
@erikian erikian force-pushed the fix/user-defined-aftercomplete-hooks branch from 3fab30b to fed1cc2 Compare February 21, 2023 22:26
@erikian erikian requested a review from a team as a code owner February 21, 2023 22:26
@erikian erikian force-pushed the fix/user-defined-aftercomplete-hooks branch from fed1cc2 to 1822873 Compare February 22, 2023 02:25
@jhetuts
Copy link

jhetuts commented Apr 28, 2023

There were other hooks not being passed to packager, so I've added them too

Is the afterCopy hook is one of those?

@erikian
Copy link
Member Author

erikian commented Apr 28, 2023

@jhetuts no, afterComplete is the only hook not being passed

@erickzhao erickzhao merged commit b8509d2 into electron:main Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants