mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-16 00:19:54 +00:00
wip
This commit is contained in:
parent
4935c1a985
commit
93c9bc67bc
@ -1,16 +0,0 @@
|
|||||||
const fs = require('fs')
|
|
||||||
const signHook = require('./afterSignHook')
|
|
||||||
|
|
||||||
module.exports = async function (params) {
|
|
||||||
// notarize the app on Mac OS only.
|
|
||||||
if (process.platform !== 'darwin' || !process.env.GITHUB_REF || !process.env.GITHUB_REF.startsWith('refs/tags/')) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log('afterBuild hook triggered')
|
|
||||||
|
|
||||||
let pkgName = fs.readdirSync('dist').find(x => x.endsWith('.pkg'))
|
|
||||||
signHook({
|
|
||||||
appOutDir: 'dist',
|
|
||||||
_pathOverride: pkgName,
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
// See: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db
|
|
||||||
|
|
||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const notarizer = require('electron-notarize')
|
|
||||||
|
|
||||||
module.exports = async function (params) {
|
|
||||||
// notarize the app on Mac OS only.
|
|
||||||
if (process.platform !== 'darwin' || !process.env.GITHUB_REF || !process.env.GITHUB_REF.startsWith('refs/tags/')) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
console.log('afterSign hook triggered', params)
|
|
||||||
|
|
||||||
let appId = 'org.tabby'
|
|
||||||
|
|
||||||
let appPath = path.join(params.appOutDir, params._pathOverride || `${params.packager.appInfo.productFilename}.app`)
|
|
||||||
if (!fs.existsSync(appPath)) {
|
|
||||||
throw new Error(`Cannot find application at: ${appPath}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Notarizing ${appId} found at ${appPath}`)
|
|
||||||
|
|
||||||
try {
|
|
||||||
await notarizer.notarize({
|
|
||||||
appBundleId: appId,
|
|
||||||
appPath: appPath,
|
|
||||||
appleId: process.env.APPSTORE_USERNAME,
|
|
||||||
appleIdPassword: process.env.APPSTORE_PASSWORD,
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Done notarizing ${appId}`)
|
|
||||||
}
|
|
@ -3,8 +3,8 @@ appId: org.tabby
|
|||||||
productName: Tabby
|
productName: Tabby
|
||||||
compression: normal
|
compression: normal
|
||||||
npmRebuild: false
|
npmRebuild: false
|
||||||
afterSign: "./build/mac/afterSignHook.js"
|
afterSign: "./build/mac/afterSignHook.cjs"
|
||||||
afterAllArtifactBuild: "./build/mac/afterBuildHook.js"
|
afterAllArtifactBuild: "./build/mac/afterBuildHook.cjs"
|
||||||
files:
|
files:
|
||||||
- '**/*'
|
- '**/*'
|
||||||
- dist
|
- dist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user