File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ # electron-builder generates temporary files then tells NSIS to generate the
2+ # installer. These files will have unreliable modification times which NSIS
3+ # will save by default, resulting in the installer changing each time it is
4+ # generated. We disable that so that to improve reproducibility.
5+ SetDateSave off
Original file line number Diff line number Diff line change @@ -155,6 +155,12 @@ const afterPack = async (context) => {
155155 recursivelySetFileTimes ( context . appOutDir , sourceDateEpoch ) ;
156156} ;
157157
158+ const afterSign = async ( context ) => {
159+ // Ensure that modification times are still reproducible after signing and resource
160+ // editing.
161+ recursivelySetFileTimes ( context . appOutDir , sourceDateEpoch ) ;
162+ } ;
163+
158164const build = async ( {
159165 platformName, // String that indexes into Platform[...]
160166 platformType, // Passed as first argument into platform.createTarget(...)
@@ -192,6 +198,7 @@ const build = async ({
192198 tw_update : isProduction && manageUpdates
193199 } ,
194200 afterPack,
201+ afterSign,
195202 ...extraConfig ,
196203 ...await prepare ( archName )
197204 } ;
You can’t perform that action at this time.
0 commit comments