forked from JMRI/JMRI
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request JMRI#8337 from bobjacobsen/lib-update
Add script to check lib and control file commit dates
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /bin/bash | ||
# | ||
# Script to check for control files older than libraries | ||
# | ||
# This takes a while | ||
|
||
oldest_ctl_time=`for i in nbproject/ide-file-targets.xml nbproject/project.xml pom.xml build.xml .factorypath; do git log -1 --format=%ct -- $i; done | sort | head -1` | ||
# echo $oldest_ctl_time "oldest control file time" | ||
|
||
newest_lib_time=`find lib -not -name \*.md -exec git log -1 --format=%ct -- {} \; | sort | tail -1` | ||
# echo $newest_lib_time "newest lib file time" | ||
|
||
|
||
if [ $newest_lib_time -gt $oldest_ctl_time ] | ||
then | ||
echo "Warning: some control files committed before newest lib files" | ||
echo | ||
echo "Control file commits:" | ||
for i in nbproject/ide-file-targets.xml nbproject/project.xml pom.xml build.xml .factorypath; do git log -1 --format="%ci $i" -- $i; done | sort | ||
echo | ||
echo "Most recent library commits:" | ||
find lib -exec echo -n {} \; -exec git log -1 --format=' %ci' -- {} \; | sort -r -k2 -k3 | head -10 | awk '{print $2 " " $3 " " $4 " " $1}' | ||
exit 1 | ||
fi |