aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/json-schema.ts
blob: c9ae08ac1776c19220b81e341bf13bb159cb6495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import shell from 'shelljs';

shell.exec('yarn create-json-schema');

const res = shell.exec('git status --porcelain', { silent: true });

if (res.code === 0 && !res.includes('renovate-schema.json')) {
  shell.echo('PASS: renovate-schema.json is up to date');
  shell.exit(0);
} else {
  shell.echo(
    "ERROR: renovate-schema.json needs updating. Run 'yarn create-json-schema' and commit."
  );
  shell.exit(-1);
}