renovate/test/json-schema.ts
Michael Kriese 689f86aa52 fix grep
2019-07-19 20:44:22 +02:00

15 lines
417 B
TypeScript

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);
}