Skip to content

Commit bd17d95

Browse files
committed
hack some more
1 parent dea07ea commit bd17d95

File tree

6 files changed

+33
-37
lines changed

6 files changed

+33
-37
lines changed

package-lock.json

Lines changed: 23 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/compass/.depcheckrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ ignores: [
1313
'mongodb-client-encryption',
1414
'interruptor',
1515
# webpack always externalizes 'clipboard' for legacy reasons
16-
'clipboard'
16+
'clipboard',
17+
# include signing-utils so that signtool.go can get to it
18+
'@mongodb-js/signing-utils'
1719
]

packages/compass/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@
231231
"@mongodb-js/my-queries-storage": "^0.22.0",
232232
"@mongodb-js/prettier-config-compass": "^1.2.0",
233233
"@mongodb-js/sbom-tools": "^0.7.0",
234+
"@mongodb-js/signing-utils": "^0.3.7",
234235
"@mongodb-js/testing-library-compass": "^1.2.0",
235236
"@mongodb-js/tsconfig-compass": "^1.2.0",
236237
"@mongodb-js/webpack-config-compass": "^1.6.0",

packages/hadron-build/lib/target.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -436,20 +436,7 @@ class Target {
436436
);
437437

438438
const electronWinstaller = require('electron-winstaller');
439-
440-
// We monkey-patch the signtool.exe that comes with electron-winstaller
441-
// with our drop-in replace ment signtool.exe written in go so that
442-
// electron-winstaller will execute that. But it requires
443-
// @mongodb-js/signing-tools via node and that's only a dep of this
444-
// package. So change the working directory to packages/hadron-build so
445-
// that that would work.
446-
const oldCWD = process.cwd();
447-
process.chdir(path.join(__dirname, '..', '..'));
448-
try {
449-
await electronWinstaller.createWindowsInstaller(this.installerOptions);
450-
} finally {
451-
process.chdir(oldCWD);
452-
}
439+
await electronWinstaller.createWindowsInstaller(this.installerOptions);
453440

454441
await fs.promises.rename(
455442
this.dest('RELEASES'),
2 KB
Binary file not shown.

packages/hadron-build/signtool/signtool.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ func main() {
6666
if err != nil {
6767
fmt.Println("Error signing the file")
6868
fmt.Printf("%s\n", stdoutStderr)
69-
log.Fatal(err)
69+
log.Println(err)
70+
// if we error out then we won't see much because of how
71+
// electron-windows-installer fails. We'll have to rely on package
72+
// verification elsewhere to fail CI
73+
return
7074
}
7175

7276
fmt.Println("File signed successfully.")

0 commit comments

Comments
 (0)