Skip to content

Commit f932722

Browse files
committed
check-release.pl: ignore Happy New Year commits
When updating the copyright headers every year, we touch all the source files. Let's not count that as a commit ahead of the latest release. Otherwise, status.imagej.net shows tons of "1 ahead" components.
1 parent 5dba1c1 commit f932722

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

check-release.pl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ ($$$)
165165

166166
my @commits = `git rev-list $releaseRef...origin/master -- $sourceDirs`;
167167
my $commitCount = @commits;
168+
169+
# ignore commits which are known to be irrelevant
170+
foreach my $commit (@commits) {
171+
chomp $commit;
172+
my $commitMessage = `git log -1 --oneline $commit`;
173+
if ($commitMessage =~ /^[a-z0-9]{7} [Hh]appy .*[Nn]ew [Yy]ear/) {
174+
# Ignore "Happy New Year" copyright header updates
175+
debug("Ignoring Happy New Year commit: $commit");
176+
$commitCount--;
177+
}
178+
}
179+
168180
if ($verbose || $commitCount > 0) {
169181
# new commits on master; a release is potentially needed
170182
print "$ga: $commitCount commits on master since $release_version\n";

0 commit comments

Comments
 (0)