-
Notifications
You must be signed in to change notification settings - Fork 245
fix: sign the windows setup .exe COMPASS-8945 COMPASS-8950 #6709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
dcf9b1e
71da39d
208ca42
3ed8b04
2a328a0
32fae9d
7e16bc0
dea07ea
bd17d95
3890616
431dfd5
183b795
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,10 @@ func main() { | |
| } | ||
|
|
||
| allowedExtensions := []string{ | ||
| "GARASIGN_USERNAME", | ||
| "GARASIGN_PASSWORD", | ||
| "ARTIFACTORY_USERNAME", | ||
| "ARTIFACTORY_PASSWORD", | ||
| "SIGNING_SERVER_HOSTNAME", | ||
| "SIGNING_SERVER_PRIVATE_KEY", | ||
| "SIGNING_SERVER_USERNAME", | ||
|
|
@@ -55,12 +59,15 @@ func main() { | |
| cmd := exec.Command("node", "-e", script) | ||
| fmt.Println("Running command:", cmd.String()) | ||
|
|
||
| cmd.Stdout = os.Stdout | ||
| cmd.Stderr = os.Stderr | ||
| stdoutStderr, err := cmd.CombinedOutput() | ||
|
|
||
| err := cmd.Run() | ||
| if err != nil { | ||
| fmt.Println("Error signing the file") | ||
| fmt.Printf("%s\n", stdoutStderr) | ||
| log.Println(err) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally this would be |
||
| // if we error out then we won't see much because of how | ||
| // electron-windows-installer fails. We'll have to rely on package | ||
| // verification elsewhere to fail CI | ||
| return | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the bug was that signtool.go is doing
node -e 'require("@mongodb-js/signing-utils")'from the packages/compass folder and that node module doesn't exist there.In the past it probably worked because the dep was hoisted and then it broke because now it is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think doing something like
npx run sign -w @mongodb-js/hadron-build -- path-to-filefrom signtool.go would be a cleaner fix. I'll try that in a follow-up.