Skip to content

Commit

Permalink
chore: update electron notary tool to v2 (#27380)
Browse files Browse the repository at this point in the history
* chore: update electron-notarize to @electron/notarize v2. legacy tooling will stop working November 23 and this allows us to get ahead of the curve. see electron/notarize@bf23272. Also inquirer types were having issues in build which updated from v7 to v8. Nothing major changed there except dropping node 10 support

chore: add Team ID to mac os code sign as it is now needed by the new signing tool. see https://github.com/electron/notarize#notes-on-your-teamid. [run ci]

* chore: debug notary [run ci]
  • Loading branch information
AtofStryker committed Jul 25, 2023
1 parent 7425314 commit 3caabd3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

07-19-23
07-25-23
10 changes: 5 additions & 5 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'reduce_requests_paused'
- 'chore/debug-arm64-notary'
- 'chore/use_cloud_m1_runners'
- 'publish-binary'

Expand All @@ -43,7 +43,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'reduce_requests_paused', << pipeline.git.branch >> ]
- equal: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
Expand All @@ -55,7 +55,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'reduce_requests_paused', << pipeline.git.branch >> ]
- equal: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- equal: [ 'publish-binary', << pipeline.git.branch >> ]
- matches:
Expand All @@ -77,7 +77,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'reduce_requests_paused', << pipeline.git.branch >> ]
- equal: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
Expand Down Expand Up @@ -1127,7 +1127,7 @@ commands:
- run:
name: Package the Cypress binary
environment:
DEBUG: electron-builder,electron-osx-sign*
DEBUG: electron-builder,electron-osx-sign*,electron-notarize*
# notarization on Mac can take a while
no_output_timeout: "45m"
command: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@cypress/request": "^2.88.11",
"@cypress/request-promise": "4.2.6",
"@electron/fuses": "1.6.1",
"@electron/notarize": "^2.1.0",
"@fellow/eslint-plugin-coffee": "0.4.13",
"@graphql-codegen/add": "3.1.0",
"@graphql-codegen/cli": "2.2.0",
Expand Down Expand Up @@ -145,7 +146,6 @@
"detect-port": "^1.3.0",
"electron": "21.0.0",
"electron-builder": "^22.13.1",
"electron-notarize": "^1.1.1",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "7.22.0",
"eslint-plugin-cypress": "2.11.2",
Expand Down
7 changes: 6 additions & 1 deletion scripts/after-sign-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// "afterSign": "./scripts/after-sign-hook.js"
const fs = require('fs')
const path = require('path')
let electron_notarize = require('electron-notarize')
let electron_notarize = require('@electron/notarize')

module.exports = async function (params) {
// Only notarize the app on Mac OS.
Expand Down Expand Up @@ -40,12 +40,17 @@ module.exports = async function (params) {
throw new Error('Missing Apple password for notarization: NOTARIZE_APP_PASSWORD')
}

if (!process.env.NOTARIZE_APP_TEAM_ID) {
throw new Error('Missing Apple team id for notarization: NOTARIZE_APP_TEAM_ID')
}

try {
await electron_notarize.notarize({
appBundleId: appId,
appPath,
appleId: process.env.NOTARIZE_APP_APPLE_ID,
appleIdPassword: process.env.NOTARIZE_APP_PASSWORD,
teamId: process.env.NOTARIZE_APP_TEAM_ID,
})
} catch (error) {
console.error('could not notarize application')
Expand Down
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2556,6 +2556,15 @@
global-agent "^3.0.0"
global-tunnel-ng "^2.7.1"

"@electron/notarize@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3"
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==
dependencies:
debug "^4.1.1"
fs-extra "^9.0.1"
promise-retry "^2.0.1"

"@electron/universal@1.0.5":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.0.5.tgz#b812340e4ef21da2b3ee77b2b4d35c9b86defe37"
Expand Down

5 comments on commit 3caabd3

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3caabd3 Jul 25, 2023

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 arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/darwin-arm64/develop-3caabd3a0f22d31220cf7335f99b95ed81105844/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3caabd3 Jul 25, 2023

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 arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-arm64/develop-3caabd3a0f22d31220cf7335f99b95ed81105844/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3caabd3 Jul 25, 2023

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.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/darwin-x64/develop-3caabd3a0f22d31220cf7335f99b95ed81105844/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3caabd3 Jul 25, 2023

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.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-x64/develop-3caabd3a0f22d31220cf7335f99b95ed81105844/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 3caabd3 Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/win32-x64/develop-3caabd3a0f22d31220cf7335f99b95ed81105844/cypress.tgz

Please sign in to comment.