2020-08-10 08:56:41 +00:00
|
|
|
import { sanityCheckAll, consistencyCheckAll } from "../action/update-all";
|
2020-08-06 19:17:38 +00:00
|
|
|
|
|
|
|
export async function main() {
|
2020-08-10 08:56:41 +00:00
|
|
|
var returnCode: number = 0;
|
|
|
|
|
2020-08-06 19:17:38 +00:00
|
|
|
try {
|
2020-08-24 15:06:21 +00:00
|
|
|
const [errors1, warnings1] = await sanityCheckAll();
|
|
|
|
// warnings ignored
|
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
|
|
|
const [errors1, warnings1] = await consistencyCheckAll();
|
|
|
|
// warnings ignored
|
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();
|