Skip to content

Commit 9c9b3f7

Browse files
authored
Update copyright year reported by --version. NFC (#23662)
It seems the reporting the most recent year is what tools like gcc do: ``` $ gcc --version gcc (Debian 14.2.0-3+build3) 14.2.0 Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ```
1 parent 5226767 commit 9c9b3f7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

emcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def run(args):
568568
if '--version' in args:
569569
print(version_string())
570570
print('''\
571-
Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
571+
Copyright (C) 2025 the Emscripten authors (see AUTHORS.txt)
572572
This is free and open source software under the MIT license.
573573
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
574574
''')

test/test_other.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# noqa: E241
88

99
from functools import wraps
10+
from datetime import datetime
1011
import glob
1112
import gzip
1213
import importlib
@@ -484,8 +485,10 @@ def test_emcc_basics(self, compiler, suffix):
484485
# --version
485486
output = self.run_process([compiler, '--version'], stdout=PIPE, stderr=PIPE)
486487
output = output.stdout.replace('\r', '')
488+
# This test will require updating once per year. Sorry.
489+
this_year = datetime.now().year
487490
self.assertContained('emcc (Emscripten gcc/clang-like replacement', output)
488-
self.assertContained('''Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt)
491+
self.assertContained(f'''Copyright (C) {this_year} the Emscripten authors (see AUTHORS.txt)
489492
This is free and open source software under the MIT license.
490493
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
491494
''', output)

0 commit comments

Comments
 (0)