Skip to content

Commit

Permalink
fix: use @electron/notarize instead of electron-notarize
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Oct 14, 2024
1 parent 45cb8a4 commit 970f821
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ jobs:
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
APPLEID: ${{ secrets.APPLEID }}
APPLEIDTEAM: ${{ secrets.APPLEIDTEAM }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
- name: Remove TSR-Bridge latest-mac.yml
uses: flcdrg/remove-release-asset-action@v1
Expand Down Expand Up @@ -202,5 +203,6 @@ jobs:
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
APPLEID: ${{ secrets.APPLEID }}
APPLEIDTEAM: ${{ secrets.APPLEIDTEAM }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
USE_HARD_LINKS: false
1 change: 1 addition & 0 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
APPLEID: ${{ secrets.APPLEID }}
APPLEIDTEAM: ${{ secrets.APPLEIDTEAM }}
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
- name: Collect binaries
run: |
Expand Down
2 changes: 1 addition & 1 deletion apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
},
"homepage": "https://github.com/SuperFlyTV/SuperConductor#readme",
"devDependencies": {
"@electron/notarize": "^2.5.0",
"@types/deep-extend": "0.6.2",
"@types/jest": "^29.5.13",
"@types/koa": "^2.15.0",
Expand All @@ -50,7 +51,6 @@
"concurrently": "^7.6.0",
"electron": "32.2.0",
"electron-builder": "24.13.3",
"electron-notarize": "^1.2.2",
"jest": "^29.7.0",
"nodemon": "^2.0.22",
"sass": "^1.79.4",
Expand Down
7 changes: 4 additions & 3 deletions apps/app/tools/notarize.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Based on https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/ */

// eslint-disable-next-line @typescript-eslint/no-require-imports
const { notarize } = require('electron-notarize')
const { notarize } = require('@electron/notarize')

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context
if (electronPlatformName !== 'darwin') {
return
}

if (!process.env.APPLEID || !process.env.APPLEIDPASS) {
if (!process.env.APPLEID || !process.env.APPLEIDPASS || !process.env.APPLEIDTEAM) {
// eslint-disable-next-line no-console
console.log('Skipping notarizing, due to missing APPLEID or APPLEIDPASS environment variables')
console.log('Skipping notarizing, due to missing APPLEID, APPLEIDTEAM or APPLEIDPASS environment variables')
return
}

Expand All @@ -22,5 +22,6 @@ exports.default = async function notarizing(context) {
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
teamId: process.env.APPLEIDTEAM,
})
}
2 changes: 1 addition & 1 deletion apps/tsr-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
},
"license": "AGPL-3.0-or-later",
"devDependencies": {
"@electron/notarize": "^2.5.0",
"@types/react-toggle": "patch:@types/react-toggle@npm%3A4.0.5#~/.yarn/patches/@types-react-toggle-npm-4.0.5-c40bf309fb.patch",
"@types/triple-beam": "^1.3.5",
"@vitejs/plugin-react": "^4.3.2",
"concurrently": "^7.6.0",
"electron": "32.2.0",
"electron-builder": "24.13.3",
"electron-notarize": "^1.2.2",
"nodemon": "^2.0.22",
"sass": "^1.79.4",
"vite": "^5.4.8"
Expand Down
7 changes: 4 additions & 3 deletions apps/tsr-bridge/tools/notarize.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Based on https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/ */

// eslint-disable-next-line @typescript-eslint/no-require-imports
const { notarize } = require('electron-notarize')
const { notarize } = require('@electron/notarize')

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context
if (electronPlatformName !== 'darwin') {
return
}

if (!process.env.APPLEID || !process.env.APPLEIDPASS) {
if (!process.env.APPLEID || !process.env.APPLEIDPASS || !process.env.APPLEIDTEAM) {
// eslint-disable-next-line no-console
console.log('Skipping notarizing, due to missing APPLEID or APPLEIDPASS environment variables')
console.log('Skipping notarizing, due to missing APPLEID, APPLEIDTEAM or APPLEIDPASS environment variables')
return
}

Expand All @@ -22,5 +22,6 @@ exports.default = async function notarizing(context) {
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
teamId: process.env.APPLEIDTEAM,
})
}
25 changes: 13 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,17 @@ __metadata:
languageName: node
linkType: hard

"@electron/notarize@npm:^2.5.0":
version: 2.5.0
resolution: "@electron/notarize@npm:2.5.0"
dependencies:
debug: "npm:^4.1.1"
fs-extra: "npm:^9.0.1"
promise-retry: "npm:^2.0.1"
checksum: 10c0/262c6a90db4b18c82abb2a8f5349d1bf19ac34a440fe6c01b8aee302b1c886a79906693e6c3fdba2a4efa23a6519abf2113a882b438f7b6687eb2daed3da2afa
languageName: node
linkType: hard

"@electron/osx-sign@npm:1.0.5":
version: 1.0.5
resolution: "@electron/osx-sign@npm:1.0.5"
Expand Down Expand Up @@ -6115,16 +6126,6 @@ asn1@evs-broadcast/node-asn1:
languageName: node
linkType: hard

"electron-notarize@npm:^1.2.2":
version: 1.2.2
resolution: "electron-notarize@npm:1.2.2"
dependencies:
debug: "npm:^4.1.1"
fs-extra: "npm:^9.0.1"
checksum: 10c0/62b9ef82488d9c366d909198e58c1c810042f5067e6a0d74e3c7d9f7a48f8a9bb7f4dbc1cdd8e39835dce473321338517ba16db9aa65a7073621ef0147ba7c0c
languageName: node
linkType: hard

"electron-publish@npm:24.13.1":
version: 24.13.1
resolution: "electron-publish@npm:24.13.1"
Expand Down Expand Up @@ -14372,6 +14373,7 @@ asn1@evs-broadcast/node-asn1:
resolution: "superconductor@workspace:apps/app"
dependencies:
"@babel/core": "npm:^7.25.8"
"@electron/notarize": "npm:^2.5.0"
"@emotion/react": "npm:^11.13.3"
"@emotion/styled": "npm:^11.13.0"
"@feathersjs/errors": "npm:^5.0.30"
Expand Down Expand Up @@ -14412,7 +14414,6 @@ asn1@evs-broadcast/node-asn1:
deepmerge-ts: "npm:^5.1.0"
electron: "npm:32.2.0"
electron-builder: "npm:24.13.3"
electron-notarize: "npm:^1.2.2"
electron-updater: "npm:^6.3.9"
formik: "patch:formik@npm%3A2.2.9#~/.yarn/patches/formik-npm-2.2.9-0e8cb516ca.patch"
formik-mui: "npm:^5.0.0-alpha.0"
Expand Down Expand Up @@ -14921,6 +14922,7 @@ asn1@evs-broadcast/node-asn1:
resolution: "tsr-bridge@workspace:apps/tsr-bridge"
dependencies:
"@babel/core": "npm:^7.25.8"
"@electron/notarize": "npm:^2.5.0"
"@mui/material": "npm:^5.16.7"
"@shared/api": "npm:^0.12.0-alpha.5"
"@shared/lib": "npm:^0.12.0-alpha.5"
Expand All @@ -14934,7 +14936,6 @@ asn1@evs-broadcast/node-asn1:
concurrently: "npm:^7.6.0"
electron: "npm:32.2.0"
electron-builder: "npm:24.13.3"
electron-notarize: "npm:^1.2.2"
electron-updater: "npm:^6.3.9"
nodemon: "npm:^2.0.22"
react: "npm:^18.3.1"
Expand Down

0 comments on commit 970f821

Please sign in to comment.