Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update LICENSE.md to 2024 #21833

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright 2018-2023 the Deno authors
Copyright 2018-2024 the Deno authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
12 changes: 11 additions & 1 deletion tools/copyright_checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

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

const copyrightYear = 2024;

const buffer = new Uint8Array(1024);
const textDecoder = new TextDecoder();

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

Expand Down Expand Up @@ -87,6 +89,14 @@ export async function checkCopyright() {
}
}

// check the main license file
const licenseText = Deno.readTextFileSync(ROOT_PATH + "/LICENSE.md");
if (
!licenseText.includes(`Copyright 2018-${copyrightYear} the Deno authors`)
) {
errors.push(`LICENSE.md has old copyright year`);
}

if (errors.length > 0) {
// show all the errors at the same time to prevent overlap with
// other running scripts that may be outputting
Expand Down