Skip to content

Commit

Permalink
Merge pull request JMRI#8337 from bobjacobsen/lib-update
Browse files Browse the repository at this point in the history
Add script to check lib and control file commit dates
  • Loading branch information
bobjacobsen authored Apr 14, 2020
2 parents 3a3f432 + 09a6b38 commit 232f2d3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions help/en/releasenotes/current-draft-note.shtml
Original file line number Diff line number Diff line change
Expand Up @@ -542,5 +542,9 @@
instance of a manager have been removed. Use
<code>InstanceManager.getDefault(NameOfManager.class)</code>
instead.</li>
<li><a href="https://github.com/JMRI/JMRI/pull/8286">PR 8286 revised the way
that JMRI code should fire and catch events. If you have code (Java or script)
of your own that implements event firing or tricky listening, you
should review those changes to see if they will or should affect your code.
</ul>

6 changes: 6 additions & 0 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ mvn deploy:deploy-file -DgroupId=net.bobis.jinput.hidraw -DartifactId=jhidrawplu
```
After that, add and commit the additional files that were created within lib/

After you have committed your changes, please run
```
./scripts/check_lib_dates
```
which checks the dates of the control files to make sure they've benen updated when lib/ is updated

### Specific components:

##### jsplitbutton-1.3.1.jar
Expand Down
24 changes: 24 additions & 0 deletions scripts/check_lib_dates
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

0 comments on commit 232f2d3

Please sign in to comment.