docs: document golden file requirement (#33900)

PR Close #33900
This commit is contained in:
Judy Bogart
2019-11-18 10:57:16 -08:00
committed by Alex Rickabaugh
parent 4d7a9db44c
commit a00f82797b
4 changed files with 58 additions and 8 deletions

View File

@ -82,8 +82,13 @@ export function startCli() {
if (hasDiff) {
// Under bazel, give instructions how to use bazel run to accept the golden file.
if (!!process.env['BAZEL_TARGET']) {
console.error('\n\nAccept the new golden file:');
console.error(` bazel run ${process.env['BAZEL_TARGET'].replace(/_bin$/, "")}.accept`);
console.error('\n\nIf you modify a public API, you must accept the new golden file.');
console.error('\n\nTo do so, execute the following Bazel target:');
console.error(
` yarn bazel run ${process.env['BAZEL_TARGET'].replace(/_bin$/, "")}.accept`);
console.error('\n\nFor more information, see');
console.error(
'\n https://github.com/angular/angular/blob/master/docs/PUBLIC_API.md#golden-files');
}
process.exit(1);
}