From 237c326a581bb71c6a685e4a018f96add8f0c82d Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Wed, 15 May 2024 14:19:10 -0400 Subject: [PATCH] Choose latest of commit date and author date for the end of copyright --- releng/scripts/check_features.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/releng/scripts/check_features.sh b/releng/scripts/check_features.sh index 56172821195..b164126be46 100755 --- a/releng/scripts/check_features.sh +++ b/releng/scripts/check_features.sh @@ -59,7 +59,10 @@ git ls-files -- \*/feature.xml | while read feature_xml; do feature_start_year=$(git log --reverse --format='%ad' --date="format:%Y" -- $feature_xml $plugin_dir | head -1) ;; esac - feature_end_year=$(git log --format='%ad' --date="format:%Y" -- $feature_xml $plugin_dir | head -1) + # Choose latest of commit date and author date for the end of copyright + feature_end_year_author=$(git log --format='%ad' --date="format:%Y" -- $feature_xml $plugin_dir | head -1) + feature_end_year_commit=$(git log --format='%cd' --date="format:%Y" -- $feature_xml $plugin_dir | head -1) + feature_end_year=$((echo $feature_end_year_author ; echo $feature_end_year_commit) | sort -n | tail -1) feature_name=$(grep featureName= $feature_dir/feature.properties | sed '-es,featureName=,,') if [ "$feature_start_year" = "$feature_end_year" ]; then feature_years="${feature_start_year}"