Skip to content

Commit

Permalink
fix: Add license header to generated externs
Browse files Browse the repository at this point in the history
To comply with internal regulations, even our generated externs should
have a license header.  This prepends the header to all generated
externs.

Closes shaka-project#2638

Change-Id: Idef8e7bff53363175aefa34274a8f71477e830fa
  • Loading branch information
joeyparrish committed Jun 9, 2020
1 parent c1b109a commit 6064574
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/generateExterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand Down

0 comments on commit 6064574

Please sign in to comment.