Skip to content

Commit

Permalink
Include all main Java source files
Browse files Browse the repository at this point in the history
A change in '.java' source file under 'src/main/java' may be due to
a change in its Javadoc comments. Thus, all Java source files have
to be in the checksum file, triggering a new documentation snapshot
build when at least one file is changed.
  • Loading branch information
sormuras committed Sep 29, 2018
1 parent a7ee0af commit c576fe6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/publishDocumentationSnapshotOnlyIfNecessary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ readonly github_pages_url='https://raw.githubusercontent.com/junit-team/junit5/g
#
# always generate current sums
#
rm --force "${current}"
echo "Generating checksum file..."
md5sum documentation/documentation.gradle > "${current}"
find documentation/src/ -type f -exec md5sum {} + > "${current}"
md5sum $(find documentation/src/ -type f) >> "${current}"
md5sum $(find . -wholename '**/src/main/java/*.java') >> "${current}"
stat "${current}"
md5sum "${current}"

#
# compare current with published sums
#
rm --force "${published}"
curl --silent --output "${published}" "${github_pages_url}"
if cmp --silent "${current}" "${published}" ; then
#
Expand All @@ -27,5 +29,5 @@ else
#
echo "Creating and publishing documentation..."
cp --force "${current}" "${published}"
echo "./gradlew --scan gitPublishPush"
./gradlew --scan gitPublishPush
fi

0 comments on commit c576fe6

Please sign in to comment.