Skip to content

Commit a731647

Browse files
authored
chore: update LICENSE.md to 2024 (denoland#21833)
1 parent 1af0daa commit a731647

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright 2018-2023 the Deno authors
3+
Copyright 2018-2024 the Deno authors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

tools/copyright_checker.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import { getSources, ROOT_PATH } from "./util.js";
55

6+
const copyrightYear = 2024;
7+
68
const buffer = new Uint8Array(1024);
79
const textDecoder = new TextDecoder();
810

@@ -49,7 +51,7 @@ export async function checkCopyright() {
4951
const ACCEPTABLE_LINES =
5052
/^(\/\/ deno-lint-.*|\/\/ Copyright.*|\/\/ Ported.*|\s*|#!\/.*)\n/;
5153
const COPYRIGHT_LINE =
52-
"Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.";
54+
`Copyright 2018-${copyrightYear} the Deno authors. All rights reserved. MIT license.`;
5355
const TOML_COPYRIGHT_LINE = "# " + COPYRIGHT_LINE;
5456
const C_STYLE_COPYRIGHT_LINE = "// " + COPYRIGHT_LINE;
5557

@@ -87,6 +89,14 @@ export async function checkCopyright() {
8789
}
8890
}
8991

92+
// check the main license file
93+
const licenseText = Deno.readTextFileSync(ROOT_PATH + "/LICENSE.md");
94+
if (
95+
!licenseText.includes(`Copyright 2018-${copyrightYear} the Deno authors`)
96+
) {
97+
errors.push(`LICENSE.md has old copyright year`);
98+
}
99+
90100
if (errors.length > 0) {
91101
// show all the errors at the same time to prevent overlap with
92102
// other running scripts that may be outputting

0 commit comments

Comments
 (0)