doc: add a doc helper script

changed-docs.sh (and the accompanying awk script) shows docs changed
between a previous release branch and the current master branch, in a format that
can be used for the releae notes (a list of :ref: items).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder
2022-08-30 11:22:56 -07:00
committed by David Kinder
parent 2eb6dc4e10
commit 3b02e2ebe2
2 changed files with 67 additions and 0 deletions

27
doc/scripts/changed-docs.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Create a reST :ref: list of changed documents for the release notes
# comparing the specified tag with master branch
#
#
if [ -z $1 ]; then
echo
echo Create a reST :ref: list of change documents for the release notes
echo comparing the specified tag with the master branch
echo
echo Usage:
echo \ \ changed-docs.sh upstream/release_3.0 [changed amount]
echo
echo \ \ where the optional [changed amount] \(default 10\) is the number
echo \ \ of lines added/modified/deleted before showing up in this report.
echo
elif [ "$(basename $(pwd))" != "acrn-hypervisor" ]; then
echo
echo Script must be run in the acrn-hypervisor directory and not $(basename $(pwd))
else
dir=`dirname $0`
git diff --stat `git rev-parse $1` `git rev-parse master` | \
grep \.rst | \
awk -v changes=$2 -f $dir/changed-docs.awk
fi