Pass through vendor json in the updater
This commit is contained in:
parent
5acacfeb16
commit
31bbec19ee
1 changed files with 13 additions and 5 deletions
|
@ -48,6 +48,12 @@ import {
|
||||||
|
|
||||||
const INTERVAL = 30 * durations.MINUTE;
|
const INTERVAL = 30 * durations.MINUTE;
|
||||||
|
|
||||||
|
type JSONVendorSchema = {
|
||||||
|
requireManualUpdate?: boolean;
|
||||||
|
minOSVersion?: string;
|
||||||
|
requireUserConfirmation?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
type JSONUpdateSchema = {
|
type JSONUpdateSchema = {
|
||||||
version: string;
|
version: string;
|
||||||
files: Array<{
|
files: Array<{
|
||||||
|
@ -59,10 +65,7 @@ type JSONUpdateSchema = {
|
||||||
path: string;
|
path: string;
|
||||||
sha512: string;
|
sha512: string;
|
||||||
releaseDate: string;
|
releaseDate: string;
|
||||||
vendor?: {
|
vendor?: JSONVendorSchema;
|
||||||
requireManualUpdate?: boolean;
|
|
||||||
minOSVersion?: string;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateInformationType = {
|
export type UpdateInformationType = {
|
||||||
|
@ -71,6 +74,7 @@ export type UpdateInformationType = {
|
||||||
version: string;
|
version: string;
|
||||||
sha512: string;
|
sha512: string;
|
||||||
differentialData: DifferentialDownloadDataType | undefined;
|
differentialData: DifferentialDownloadDataType | undefined;
|
||||||
|
vendor?: JSONVendorSchema;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DownloadMode {
|
enum DownloadMode {
|
||||||
|
@ -279,7 +283,10 @@ export abstract class Updater {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.installUpdate(updateFilePath, this.canRunSilently());
|
await this.installUpdate(
|
||||||
|
updateFilePath,
|
||||||
|
!updateInfo.vendor?.requireUserConfirmation && this.canRunSilently()
|
||||||
|
);
|
||||||
|
|
||||||
const mainWindow = this.getMainWindow();
|
const mainWindow = this.getMainWindow();
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
|
@ -499,6 +506,7 @@ export abstract class Updater {
|
||||||
version,
|
version,
|
||||||
sha512,
|
sha512,
|
||||||
differentialData,
|
differentialData,
|
||||||
|
vendor,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue