@@ -9,6 +9,7 @@ const exec = promisify(require('child_process').exec)
99
1010let version
1111let zippedAppImageArtifactPath
12+ let zippedMacArtifactPath
1213const appOutDirs = new Map ( )
1314
1415/* eslint-disable no-template-curly-in-string */
@@ -205,24 +206,25 @@ module.exports = {
205206 ! targets . has ( 'zip' )
206207 ) {
207208 targets . set ( 'zip' , { } )
208- artifactPaths . push ( path . join (
209- outDir ,
210- `BitfinexReport-${ version } -x64-${ targetPlatform } .zip`
211- ) )
212209 }
213210
214211 for ( const [ targetName ] of targets ) {
215212 const ext = targetName === 'nsis'
216213 ? 'exe'
217214 : targetName
218- const appFilePath = artifactPaths . find ( ( path ) => (
215+ const foundAppFilePath = artifactPaths . find ( ( path ) => (
219216 new RegExp ( `${ targetPlatform } .*${ ext } $` , 'i' ) . test ( path )
220217 ) )
218+ const appFilePath = foundAppFilePath ?? path . join (
219+ outDir ,
220+ `BitfinexReport-${ version } -x64-${ targetPlatform } .${ ext } `
221+ )
221222
222223 if (
223224 targetPlatform === 'mac' &&
224225 targetName === 'zip'
225226 ) {
227+ zippedMacArtifactPath = appFilePath
226228 macBlockmapFilePaths . push (
227229 `${ appFilePath } .blockmap` ,
228230 path . join ( outDir , `${ channel } -mac.yml` )
@@ -299,7 +301,7 @@ module.exports = {
299301 }
300302
301303 const macFiles = macBlockmapFilePaths . length > 0
302- ? [ ... artifactPaths , ...macBlockmapFilePaths ]
304+ ? [ zippedMacArtifactPath , ...macBlockmapFilePaths ]
303305 : [ ]
304306 const linuxFiles = zippedAppImageArtifactPath
305307 ? [ zippedAppImageArtifactPath ]
0 commit comments