Introduce `requireManualUpdate` yaml flag

This commit is contained in:
Fedor Indutny 2022-03-29 15:46:18 -07:00 committed by GitHub
parent 2aac3b5cb9
commit 13f4948d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -67,6 +67,7 @@ type JSONUpdateSchema = {
path: string;
sha512: string;
releaseDate: string;
requireManualUpdate?: boolean;
};
export type UpdateInformationType = {
@ -358,6 +359,15 @@ export abstract class Updater {
): Promise<UpdateInformationType | undefined> {
const yaml = await getUpdateYaml();
const parsedYaml = parseYaml(yaml);
if (parsedYaml.requireManualUpdate) {
this.logger.warn('checkForUpdates: manual update required');
this.markCannotUpdate(
new Error('yaml file has requireManualUpdate flag')
);
return;
}
const version = getVersion(parsedYaml);
if (!version) {