-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.js
More file actions
99 lines (96 loc) · 2.46 KB
/
build.config.js
File metadata and controls
99 lines (96 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
const path = require('path');
const fs = require('fs');
const glob = require('glob');
const { execSync } = require('child_process');
require('dotenv').config();
const shouldNotarize = process.env.ENABLE_NOTARIZE === '1';
module.exports = {
appId: 'com.playback.app',
productName: 'Playback',
directories: {
output: 'release',
buildResources: 'assets',
},
files: [
'dist/**/*',
'node_modules/better-sqlite3/**/*',
'node_modules/aws-sdk/**/*',
'node_modules/amazon-cognito-identity-js/**/*',
'node_modules/axios/**/*',
'node_modules/screenshot-desktop/**/*',
'node_modules/undici/**/*',
'node_modules/async-limiter/**/*',
'node_modules/pidusage/**/*',
'node_modules/electron-log/**/*',
'node_modules/electron-updater/**/*',
'package.json'
],
asarUnpack: [
'**/better-sqlite3/**',
'**/pidusage/**',
'**/preload/**'
],
mac: {
category: 'public.app-category.productivity',
hardenedRuntime: true,
entitlements: 'entitlements.mac.plist',
entitlementsInherit: 'entitlements.mac.inherit.plist',
gatekeeperAssess: false,
sign: false,
// identity: 'Fabian Weber (2GPXPUFF8U)',
icon: 'src/assets/PlaybackIcon.icns',
notarize: false,
},
dmg: {
sign: true
},
extraResources: [
{
from: '.env.production',
to: '.env.production'
},
{
from: 'dist/bin',
to: 'bin'
},
{ from: 'dist/assets',
to: 'assets'
},
{
from: 'dist/preload',
to: 'preload'
},
{
from: 'dist/workers',
to: 'workers'
}
],
publish: [
{
provider: 's3',
bucket: 'playback-updater',
region: 'eu-north-1',
path: 'updates'
//acl: 'public-read'
}
],
afterSign: async (ctx) => {
if (!shouldNotarize) {
console.log('🛑 skipping notarization bc ENABLE_NOTARIZE != 1');
return;
}
const dmgPath = path.join(process.cwd(), 'release', `Playback-${process.env.VERSION}-arm64.dmg`);
if (!fs.existsSync(dmgPath)) {
console.error(`❌ .dmg file not found at ${dmgPath}`);
return;
}
console.log(`📡 submitting .dmg to notarization...`);
execSync(
`xcrun notarytool submit "${dmgPath}" --keychain-profile "playback-creds" --wait`,
{ stdio: 'inherit' }
);
console.log('✅ notarization complete! Stapling...');
execSync(`xcrun stapler staple "${dmgPath}"`, { stdio: 'inherit' });
console.log('✅ stapling complete!');
},
};