acrn-hypervisor/doc/scripts/changed-docs.sh
David B. Kinder 3b02e2ebe2 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>
2022-08-30 11:45:35 -07:00

28 lines
877 B
Bash
Executable File

#!/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