File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 8
8
install :
9
9
# Setup the code signing certificate
10
10
- ps : >-
11
- if (Test-Path $env:WINDOWS_CERTIFICATE_P12) {
12
- $filename = Convert-Path .\cert.p12
11
+ if (Test-Path Env:\WINDOWS_CERTIFICATE_P12) {
12
+ $workingDirectory = Convert-Path (Resolve-Path -path ".")
13
+ $filename = "$workingDirectory\cert.p12"
13
14
$bytes = [Convert]::FromBase64String($env:WINDOWS_CERTIFICATE_P12)
14
15
[IO.File]::WriteAllBytes($filename, $bytes)
15
-
16
- $env:WINDOWS_CERTIFICATE_FILE = $filename
17
16
}
18
17
- ps : Install-Product node $env:nodejs_version x64
19
18
- node --version
Original file line number Diff line number Diff line change 1
1
/* tslint:disable */
2
2
3
3
const path = require ( 'path' )
4
+ const fs = require ( 'fs' )
4
5
const packageJson = require ( './package.json' )
5
6
6
7
const { version } = packageJson
@@ -39,6 +40,14 @@ module.exports = {
39
40
name : '@electron-forge/maker-squirrel' ,
40
41
platforms : [ 'win32' ] ,
41
42
config : ( arch ) => {
43
+ const certificateFile = process . env . CI
44
+ ? path . join ( __dirname , 'cert.p12' )
45
+ : process . env . WINDOWS_CERTIFICATE_FILE ;
46
+
47
+ if ( ! certificateFile || ! fs . existsSync ( certificateFile ) ) {
48
+ console . warn ( `Warning: Could not find certificate file at ${ certificateFile } ` )
49
+ }
50
+
42
51
return {
43
52
name : 'electron-fiddle' ,
44
53
authors : 'Electron Community' ,
@@ -49,8 +58,8 @@ module.exports = {
49
58
remoteReleases : '' ,
50
59
setupExe : `electron-fiddle-${ version } -${ arch } -setup.exe` ,
51
60
setupIcon : path . resolve ( iconDir , 'fiddle.ico' ) ,
52
- certificateFile : process . env . WINDOWS_CERTIFICATE_FILE ,
53
- certificatePassword : process . env . WINDOWS_CERTIFICATE_PASSWORD
61
+ certificatePassword : process . env . WINDOWS_CERTIFICATE_PASSWORD ,
62
+ certificateFile
54
63
}
55
64
}
56
65
} ,
You can’t perform that action at this time.
0 commit comments