Skip to content

Commit

Permalink
Cleanup local variables in electronBuilder configs
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Feb 11, 2022
1 parent 481bb3d commit 86a8fbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions config/electronBuilder/electronBuilder.ghactions.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const baseElectronBuilderConfig = require('./electronBuilder.local.config');

const isStagingBuild = process.env.NODE_ENV === 'staging';

module.exports = {
...baseElectronBuilderConfig,
publish: [{
provider: 's3',
bucket: isStagingBuild ? 'staging-expensify-cash' : 'expensify-cash',
bucket: process.env.NODE_ENV === 'staging' ? 'staging-expensify-cash' : 'expensify-cash',
channel: 'latest',
}],
afterSign: './desktop/notarize.js',
Expand Down
6 changes: 3 additions & 3 deletions config/electronBuilder/electronBuilder.local.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ENVIRONMENT = require('../../src/CONST/ENVIRONMENT');

const isStagingBuild = process.env.NODE_ENV === 'staging';
const isStaging = process.env.NODE_ENV === 'staging';

/**
* The basic app configurations for the production and staging Electron builds,
Expand All @@ -13,11 +13,11 @@ module.exports = {
productName: 'New Expensify',
extraMetadata: {
main: './desktop/main.js',
electronEnvironment: isStagingBuild ? ENVIRONMENT.STAGING : ENVIRONMENT.PRODUCTION,
electronEnvironment: isStaging ? ENVIRONMENT.STAGING : ENVIRONMENT.PRODUCTION,
},
mac: {
category: 'public.app-category.finance',
icon: isStagingBuild ? './desktop/icon-stg.png' : './desktop/icon.png',
icon: isStaging ? './desktop/icon-stg.png' : './desktop/icon.png',
hardenedRuntime: true,
entitlements: 'desktop/entitlements.mac.plist',
entitlementsInherit: 'desktop/entitlements.mac.plist',
Expand Down

0 comments on commit 86a8fbd

Please sign in to comment.