1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-11 13:13:59 +03:00

use keygen for updates

This commit is contained in:
Eugene Pankov 2022-10-01 13:04:55 +02:00
parent 37e058d7d8
commit 67914e7ee4
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
10 changed files with 379 additions and 363 deletions

View File

@ -137,6 +137,10 @@ Plugins and themes can be installed directly from the Settings view inside Tabby
[**packagecloud**](https://packagecloud.io) has provided free Debian/RPM repository hosting
[![](https://user-images.githubusercontent.com/161476/193406404-1784f40c-eaba-44d0-af11-d8bd35517382.png)](https://keygen.sh/?via=eugene)
[**keygen**](https://keygen.sh/?via=eugene) has provided free release & auto-update hosting
<a name="contributing"></a>
# Contributing

View File

@ -34,8 +34,6 @@ extraResources:
- extras
asarUnpack:
- 'dist/*.map'
publish:
- provider: github
win:
icon: "./build/windows/icon.ico"

View File

@ -16,12 +16,9 @@ builder({
extraMetadata: {
version: vars.version,
},
        publish: process.env.GH_TOKEN || process.env.GITHUB_TOKEN ? {
            provider: 'github',
            channel: `latest-${process.env.ARCH}`,
        } : undefined,
    },
     publish: ( process.env.GH_TOKEN || process.env.GITHUB_TOKEN ) ? ( isTag ? 'always' : 'onTagOrDraft' ) : 'never',
publish: process.env.KEYGEN_TOKEN ? vars.keygenConfig : undefined,
},
publish: process.env.KEYGEN_TOKEN ? isTag ? 'always' : 'onTagOrDraft' : 'never',
}).catch(e => {
console.error(e)
process.exit(1)

View File

@ -25,12 +25,15 @@ builder({
identity: !process.env.CI || process.env.CSC_LINK ? undefined : null,
},
npmRebuild: process.env.ARCH !== 'arm64',
publish: process.env.GH_TOKEN || process.env.GITHUB_TOKEN ? {
provider: 'github',
channel: `latest-${process.env.ARCH}`,
publish: process.env.KEYGEN_TOKEN ? {
product: {
arm64: '98fbadee-c707-4cd6-9d99-56683595a846',
x86_64: 'f5a48841-d5b8-4b7b-aaa7-cf5bffd36461',
}[process.env.ARCH],
...vars.keygenConfig,
} : undefined,
},
publish: ( process.env.GH_TOKEN || process.env.GITHUB_TOKEN ) ? ( isTag ? 'always' : 'onTagOrDraft' ) : 'never',
publish: process.env.KEYGEN_TOKEN ? isTag ? 'always' : 'onTagOrDraft' : 'never',
}).catch(e => {
console.error(e)
process.exit(1)

View File

@ -15,12 +15,9 @@ builder({
extraMetadata: {
version: vars.version,
},
publish: process.env.GH_TOKEN || process.env.GITHUB_TOKEN ? {
provider: 'github',
channel: `latest-${process.arch}`,
} : undefined,
publish: process.env.KEYGEN_TOKEN ? vars.keygenConfig : undefined,
},
publish: ( process.env.GH_TOKEN || process.env.GITHUB_TOKEN ) ? ( isTag ? 'always' : 'onTagOrDraft' ) : 'never',
publish: process.env.KEYGEN_TOKEN ? isTag ? 'always' : 'onTagOrDraft' : 'never',
}).catch(e => {
console.error(e)
process.exit(1)

View File

@ -46,3 +46,29 @@ exports.bundledModules = [
'@ng-bootstrap',
]
exports.electronVersion = electronInfo.version
exports.keygenConfig = {
provider: 'keygen',
account: 'a06315f2-1031-47c6-9181-e92a20ec815e',
channel: 'stable',
product: {
win32: {
x64: 'f481b9d6-d5da-4970-b926-f515373e986f',
arm64: '950999b9-371c-419b-b291-938c5e4d364c',
}[process.env.ARCH ?? process.arch],
darwin: {
arm64: '98fbadee-c707-4cd6-9d99-56683595a846',
x86_64: 'f5a48841-d5b8-4b7b-aaa7-cf5bffd36461',
x64: 'f5a48841-d5b8-4b7b-aaa7-cf5bffd36461',
}[process.env.ARCH ?? process.arch],
linux: {
x64: '7bf45071-3031-4a26-9f2e-72604308313e',
arm64: '39e3c736-d4d4-4fbf-a201-324b7bab0d17',
armv7l: '50ae0a82-7f47-4fa4-b0a8-b0d575ce9409',
}[process.env.ARCH ?? process.arch],
}[process.platform],
}
if (!exports.keygenConfig.product) {
throw new Error(`Unrecognized platform ${process.platform}/${process.env.ARCH ?? process.arch}`)
}

View File

@ -55,12 +55,6 @@ export class ElectronUpdaterService extends UpdaterService {
if (config.store.enableAutomaticUpdates && this.electronUpdaterAvailable && !process.env.TABBY_DEV) {
this.logger.debug('Checking for updates')
try {
this.autoUpdater.setFeedURL({
provider: 'github',
repo: 'tabby',
owner: 'eugeny',
channel: `latest-${process.arch}`,
})
this.autoUpdater.checkForUpdates()
} catch (e) {
this.electronUpdaterAvailable = false

677
yarn.lock

File diff suppressed because it is too large Load Diff