From 606457488f77e9cf5cac2c82e94bb4ce35d50e2a Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 9 Jun 2020 15:56:49 -0700 Subject: [PATCH] fix: Add license header to generated externs To comply with internal regulations, even our generated externs should have a license header. This prepends the header to all generated externs. Closes #2638 Change-Id: Idef8e7bff53363175aefa34274a8f71477e830fa --- build/generateExterns.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/generateExterns.js b/build/generateExterns.js index 318b4d1f37..02d8c959e4 100755 --- a/build/generateExterns.js +++ b/build/generateExterns.js @@ -846,8 +846,12 @@ function main(args) { // Get externs. const externs = sorted.map((x) => x.externs).join(''); + // Get license header. + const licenseHeader = fs.readFileSync(__dirname + '/license-header', 'utf-8'); + // Output generated externs, with an appropriate header. fs.writeFileSync(outputPath, + licenseHeader + '/**\n' + ' * @fileoverview Generated externs. DO NOT EDIT!\n' + ' * @externs\n' +