Introduce `requireManualUpdate` yaml flag

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2022-03-29 17:17:03 -07:00 committed by GitHub
parent feb69caa7a
commit 3a0dc63196
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) {