Skip to content

Commit

Permalink
[GR-56803] Add mx checkcopyrights --assume-modified
Browse files Browse the repository at this point in the history
PullRequest: mx/1831
  • Loading branch information
eregon committed Sep 3, 2024
2 parents dda8c3d + 00ed979 commit d1f3448
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.28.0",
"mx_version": "7.29.5",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ private static void initCopyrightKinds() throws IOException {
private static final Options options = new Options();
private static final Option<Boolean> help = Options.newBooleanOption("help", false, "Show help message and exit.");
private static final Option<String> COPYRIGHT_DIR = Options.newStringOption("copyright-dir", null, "override default location of copyright files");
private static final Option<Boolean> ASSUME_MODIFIED = Options.newBooleanOption("assumed-modified", false,
"assume the given files are modified and so the last year should be current year. Always the case for --list-dir.");
private static final Option<List<String>> FILES_TO_CHECK = Options.newStringListOption("files", null, "list of files to check");
private static final Option<String> FILE_LIST = Options.newStringOption("file-list", null, "file containing list of files to check");
private static final Option<Boolean> DIR_WALK = Options.newBooleanOption("list-dir", false, "check all files in directory tree requiring a copyright (ls -R)");
Expand Down Expand Up @@ -767,7 +769,7 @@ private static void processFile(Calendar cal, String fileName) {
System.out.println("checking " + fileName);
}
Info info;
if (DIR_WALK.getValue() || FILE_LIST.getValue() != null) {
if (DIR_WALK.getValue() || ASSUME_MODIFIED.getValue()) {
info = getFromLastModified(cal, fileName);
} else {
final List<String> logInfo = vc.log(fileName);
Expand Down
2 changes: 1 addition & 1 deletion src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18196,7 +18196,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.29.5") # GR-57584
version = VersionSpec("7.29.6") # GR-56803

_mx_start_datetime = datetime.utcnow()

Expand Down

0 comments on commit d1f3448

Please sign in to comment.