Update the last_updated extension to correctly handle when new docs are
added and aren't yet commited into git vs. when the list of git folders
isn't correct. Previous PR #7251 incorrectly handled these as the same.
Tracked-On: #7249
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
If a new document is added, the CI system fails because the new document
hasn't been checked into the branch yet so the last_updated.py script
complains with an error. Change to use the last_published date in this
situation.
Tracked-On: #7249
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
When I added a new document that wasn't checked into GitHub yet, the doc
build failed with an unhanded exception:
Extension error (last_updated):
(exception: time data '' does not match format '%Y-%m-%d')
Problem is the git query looking up the last commit date for a file
returns an empty string for the date if the file exists but it's not in
the git repo (yet). The subsequent call to strptime raises an exception if passed
an empty string. This patch handles the exception.
Tracked-On: #7249
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Remove the proof-of-concept shell script that post-processes the
generated HTML to add the git date when the corresponding .rst file as
the last modified date, augmenting the existing published date.
Instead, use a custom last_updated.py Sphinx extension that's integrated
into the Sphinx build itself. Remove the old fix-git-modified-date.sh
script and calls to it.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>