File tree 2 files changed +12
-2
lines changed 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
MIT License
2
2
3
- Copyright 2018-2023 the Deno authors
3
+ Copyright 2018-2024 the Deno authors
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
this software and associated documentation files (the "Software"), to deal in
Original file line number Diff line number Diff line change 3
3
4
4
import { getSources , ROOT_PATH } from "./util.js" ;
5
5
6
+ const copyrightYear = 2024 ;
7
+
6
8
const buffer = new Uint8Array ( 1024 ) ;
7
9
const textDecoder = new TextDecoder ( ) ;
8
10
@@ -49,7 +51,7 @@ export async function checkCopyright() {
49
51
const ACCEPTABLE_LINES =
50
52
/ ^ ( \/ \/ d e n o - l i n t - .* | \/ \/ C o p y r i g h t .* | \/ \/ P o r t e d .* | \s * | # ! \/ .* ) \n / ;
51
53
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.` ;
53
55
const TOML_COPYRIGHT_LINE = "# " + COPYRIGHT_LINE ;
54
56
const C_STYLE_COPYRIGHT_LINE = "// " + COPYRIGHT_LINE ;
55
57
@@ -87,6 +89,14 @@ export async function checkCopyright() {
87
89
}
88
90
}
89
91
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
+
90
100
if ( errors . length > 0 ) {
91
101
// show all the errors at the same time to prevent overlap with
92
102
// other running scripts that may be outputting
You can’t perform that action at this time.
0 commit comments