2020-09-23 13:47:24 +00:00
|
|
|
import { sanityCheckAll, consistencyCheckAll } from "../generic/update-all";
|
2020-08-06 19:17:38 +00:00
|
|
|
|
2020-09-18 14:39:31 +00:00
|
|
|
export async function main(): Promise<void> {
|
|
|
|
let returnCode = 0;
|
2020-08-10 08:56:41 +00:00
|
|
|
|
2020-08-06 19:17:38 +00:00
|
|
|
try {
|
2020-08-24 15:06:21 +00:00
|
|
|
// warnings ignored
|
2020-09-18 14:39:31 +00:00
|
|
|
const [errors1] = await sanityCheckAll();
|
2020-08-12 08:03:28 +00:00
|
|
|
if (errors1.length > 0) {
|
|
|
|
returnCode = errors1.length;
|
2020-08-10 08:56:41 +00:00
|
|
|
}
|
2020-08-06 19:17:38 +00:00
|
|
|
} catch(err) {
|
|
|
|
console.error(err);
|
2020-08-10 08:56:41 +00:00
|
|
|
returnCode = 1;
|
2020-08-06 19:17:38 +00:00
|
|
|
}
|
2020-08-10 08:56:41 +00:00
|
|
|
|
|
|
|
try {
|
2020-08-24 15:06:21 +00:00
|
|
|
// warnings ignored
|
2020-09-18 14:39:31 +00:00
|
|
|
const [errors1] = await consistencyCheckAll();
|
2020-08-12 08:03:28 +00:00
|
|
|
if (errors1.length > 0) {
|
|
|
|
returnCode = errors1.length;
|
2020-08-10 08:56:41 +00:00
|
|
|
}
|
|
|
|
} catch(err) {
|
|
|
|
console.error(err);
|
|
|
|
returnCode = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
process.exit(returnCode);
|
2020-08-06 19:17:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main();
|