/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v20.3.32
scripts/validate.mts
47 строк
1 KB
Alan Agius
ci: improve error message in validation script
19 авг 2025, 18:37
19 авг 2025, 18:37
6a83e70
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { execSync } from 'node:child_process'; import templates from './templates.mjs'; import validateUserAnalytics from './validate-user-analytics.mjs'; export default async function (options: { verbose: boolean }) { let error = false; const changes = execSync(`git status --porcelain`).toString(); if (changes) { console.error('There are local changes. See below:'); console.error(changes); if (!options.verbose) { return 101; } error = true; } console.info('Running templates validation...'); await templates({}); if (execSync(`git status --porcelain`).toString()) { console.error( 'Running templates updated files... Please run "devkit-admin templates" before submitting a PR.', ); if (!options.verbose) { process.exit(2); } error = true; } console.info(''); console.info('Running User Analytics validation...'); error = (await validateUserAnalytics({})) != 0 || error; if (error) { return 101; } return 0; }