Add license headers across the project

This commit is contained in:
Evan Hahn 2020-10-30 15:34:04 -05:00 committed by Evan Hahn
parent 8c3da11996
commit 8bfaf598af
738 changed files with 2695 additions and 378 deletions

View file

@ -1,3 +1,6 @@
// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-console */
const assert = require('assert');
const fs = require('fs');
@ -65,6 +68,20 @@ async function getMarkdownForDependency(dependencyName) {
].join('\n');
}
function licenseComment() {
const fileCreatedYear = 2020;
const currentYear = new Date().getFullYear();
const yearRange =
fileCreatedYear === currentYear
? fileCreatedYear
: `${fileCreatedYear}-${currentYear}`;
return [
`<!-- Copyright ${yearRange} Signal Messenger, LLC -->`,
'<!-- SPDX-License-Identifier: AGPL-3.0-only -->',
].join('\n');
}
async function main() {
assert.deepStrictEqual(
Object.keys(optionalDependencies),
@ -90,6 +107,7 @@ async function main() {
);
const unformattedOutput = [
licenseComment(),
'# Acknowledgments',
'',
'Signal Desktop makes use of the following open source projects.',