diff --git a/config/electronBuilder.config.ts b/config/electronBuilder.config.js similarity index 74% rename from config/electronBuilder.config.ts rename to config/electronBuilder.config.js index 219da2703c62..e4ed685f65fe 100644 --- a/config/electronBuilder.config.ts +++ b/config/electronBuilder.config.js @@ -2,25 +2,25 @@ const {version} = require('../package.json'); const pullRequestNumber = process.env.PULL_REQUEST_NUMBER; -const s3Bucket: Record = { +const s3Bucket = { production: 'expensify-cash', staging: 'staging-expensify-cash', adhoc: 'ad-hoc-expensify-cash', }; -const s3Path: Record = { +const s3Path = { production: '/', staging: '/', adhoc: process.env.PULL_REQUEST_NUMBER ? `/desktop/${pullRequestNumber}/` : '/', }; -const macIcon: Record = { +const macIcon = { production: './desktop/icon.png', staging: './desktop/icon-stg.png', adhoc: './desktop/icon-adhoc.png', }; -const isCorrectElectronEnv: boolean = ['production', 'staging', 'adhoc'].includes(process.env.ELECTRON_ENV ?? ''); +const isCorrectElectronEnv = ['production', 'staging', 'adhoc'].includes(process.env.ELECTRON_ENV); if (!isCorrectElectronEnv) { throw new Error('Invalid ELECTRON_ENV!'); @@ -37,7 +37,7 @@ module.exports = { }, mac: { category: 'public.app-category.finance', - icon: process.env.ELECTRON_ENV ? macIcon[process.env.ELECTRON_ENV] : undefined, + icon: macIcon[process.env.ELECTRON_ENV], hardenedRuntime: true, entitlements: 'desktop/entitlements.mac.plist', entitlementsInherit: 'desktop/entitlements.mac.plist', @@ -54,9 +54,9 @@ module.exports = { publish: [ { provider: 's3', - bucket: process.env.ELECTRON_ENV ? s3Bucket[process.env.ELECTRON_ENV] : undefined, + bucket: s3Bucket[process.env.ELECTRON_ENV], channel: 'latest', - path: process.env.ELECTRON_ENV ? s3Path[process.env.ELECTRON_ENV] : undefined, + path: s3Path[process.env.ELECTRON_ENV], }, ], files: ['dist', '!dist/www/{.well-known,favicon*}'],