-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to electron-builder to code sign and notarize Cypress ap… (#6013)
* [email protected] * node12.8.1-chrome78-ff70 * Revert "node12.8.1-chrome78-ff70" for now This reverts commit db2d521. * update sendCommand to log on all sendcommands * promisification in 6.x * Revert "Revert "node12.8.1-chrome78-ff70" for now" This reverts commit 57fe764. * fix sendcommand * fix cdp in electron * fix desktop-gui test * skip tests that will be fixed by #4973 * bump MAX_ALLOWED_FILE_SIZE :/ * update electron browser spec * make new dialog code null-proof * add failing e2e test for issue 5475 * bump electron packager * add e2e snapshot * update deprecated electron getters/setters https://github.com/electron/electron/blob/7-1-x/docs/api/modernization/property-updates.md * build and test on Mac * use electron-builder 20.41.0 that adds an option to use hardened Mac OS, which is necessary for code notarization later. See https://github.com/electron-userland/electron-builder/releases/tag/v20.41.0 and electron-userland/electron-builder#3858 * electron-builder and pass hardenedRuntime: true * uncomment build * upload built binary on mac * back to 20.41.0, trying after sign hook without success * use current electron-builder alias instead of build * retry smoke test on first failure * testing * trying to notarize signed app (that does not have node_modules yet) * env variable names * copy node_modules ourselves * build and bundle binary on mac on circle, inject new context * enable build steps before electron build * increase mac build timeout * update build folder on mac * uncomment actual electron build command * set linux target to zip * set zip as target for all platforms * updated steps * put notarization hook back * tweaks for icons * remove dist electron before code sign * icons per platform * make node_modules copy path platform-specific * fix linux build unpacked folder * build mac * fix lint * test new mac binary against kitchensink * working on Linux build * try building entire thing on Linux * removing correct electron dist folder * increase zip size limit for now * add folder rename on Linux from linux-unpacked to Cypress * print file sizes before zipping * move linux-unpacked to build dir function * try deleting second electron file, but code signing probably would not work * test windows build [build binary] * ignore tsc errors * windows build path * windows [build binary] * update windows build folder * increase binary build timeout on Mac * no need to pass our dist folder * adding explicit list of additional binaries to code sign on mac * yarn lock * uncomment necessary build steps * electron dir for Linux * yarn lock again * back to execa v3 * use execa v4 in packages launcher * yarn lock again and again * updated tests that use execa * print build folder * add executable name on Linux * get rid of execa.shell in build scripts * remove old and commented out code * need to test building binary on Windows * throw error from after sign hook if fails * use execa to zip * yarn lock * fix after merge variable * update test * add nohoist ffmpeg installer * patch * yarn types pass * yarn lock has binary Co-authored-by: Zach Bloomquist <[email protected]> Co-authored-by: Brian Mann <[email protected]>
- Loading branch information
1 parent
aee0517
commit abf4d85
Showing
25 changed files
with
1,532 additions
and
799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,34 @@ | ||
{ | ||
"productName": "Cypress", | ||
"appId": "com.electron.cypress", | ||
"target": "zip", | ||
"mac": { | ||
"target": "zip", | ||
"forceCodeSigning": true, | ||
"publish": null, | ||
"target": "zip" | ||
} | ||
"hardenedRuntime": true, | ||
"entitlements": "./scripts/entitlements.mac.inherit.plist", | ||
"entitlementsInherit": "./scripts/entitlements.mac.inherit.plist", | ||
"type": "distribution", | ||
"binaries": [ | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/@ffmpeg-installer/darwin-x64/ffmpeg", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/watchify/node_modules/fsevents/build/Release/.node", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/watchify/node_modules/fsevents/build/Release/fse.node", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/registry-js/build/Release/registry.node", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/term-size/vendor/macos/term-size", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/trash/lib/macos-trash", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/babel-plugin-add-module-exports/node_modules/fsevents/build/Release/.node", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/babel-plugin-add-module-exports/node_modules/fsevents/build/Release/fse.node", | ||
"./build/mac/Cypress.app/Contents/Resources/app/packages/server/node_modules/fsevents/fsevents.node" | ||
] | ||
}, | ||
"linux": { | ||
"target": "dir", | ||
"executableName": "Cypress" | ||
}, | ||
"win": { | ||
"target": "dir" | ||
}, | ||
"afterPack": "./scripts/after-pack-hook.js", | ||
"afterSign": "./scripts/after-sign-hook.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import execa from 'execa' | ||
|
||
// export an object for easy method stubbing | ||
export const utils = { | ||
execa, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
abf4d85
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.
Circle has built the
linux x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.abf4d85
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.
AppVeyor has built the
win32 ia32
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.Instructions are included below, depending on the shell you are using.
In Command Prompt (
cmd.exe
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
:abf4d85
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.
AppVeyor has built the
win32 x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.Instructions are included below, depending on the shell you are using.
In Command Prompt (
cmd.exe
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
:abf4d85
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.
Circle has built the
darwin x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.