feat: signWithHook supports one-time invocation.#30
feat: signWithHook supports one-time invocation.#30YourWildDad wants to merge 1 commit intoelectron:mainfrom
Conversation
|
What can i do for merge this? |
MarshallOfSound
left a comment
There was a problem hiding this comment.
I don't think this option makes sense how it's currently implemented.
Other modules in the electron ecosystem use a hooks system to allow developers to control things like this.
Id suggest a "preSignFiles" hook that receives all files we're about to sign, and allows implementers to return a different array of files (in your case an empty array as you're going to hand these files off in one go to an external service)
Sure, I will take your advice into consideration. Currently, electron-forge and electron-packager each have their own hooks, so I wasn't sure which hooks to use to achieve the same thing. I will read through the code of forge and packager again and find a suitable hook to use. |
This pull request adds a parameter:
noIterateFiles.In my company, a single Windows certificate is used for signing multiple Electron applications, so we want to centralize the signing capability onto one device to save on certificate purchase costs.
Currently, I plan to modify the signing process on each CI (Continuous Integration) device using a
hookFunction. This involves compressing all DLLs that need to be signed into a ZIP file, uploading it to a dedicated signing machine, downloading the signed artifacts after signing is complete, and completing the remote signing process. This ensures that the signing machine does not need to perform any additional tasks, such as packaging frontend artifacts.However, the original logic of
signWithHookswould call thehookFunctionmultiple times, which would be disastrous in my plan as it would lead to multiple upload and download processes. Therefore, I added a parameter to control this logic. If this parameter is not passed, no one's logic will be affected because it is forward-compatible.Additionally, some parameters causing type errors were removed from the unit test section.