In order to compare previous documentation with the current one and add update/added marker to TOC, we use DiffMk version 3.0.a1. tool.
We added two script files in the bin folder of the DiffMk distribution:
The first is responsible for comparing 2 files and producing a third file with *diff* markers. The second one we use to indicate the files to compare and the output files, the format is the following: ./run.sh [the path to the file] [the path to the file modified] [the path to the output file]
To identify the changes between two different revisions of the same guide, use the following line: ./run.sh /path/to/the/old/revision/guide/master.xml /path/to/the/current/revision/guide/master.xml /path/to/the/produced/by/diffmk/master_output.xml
Next, run the run_mkdiff.sh
Actually, the DiffMk is not an ideal tool for comparing. It has a lot of lacks. Here are some of such lacks we run into:
- It removes the HTML entities when outputs the file, for instance & in the links;
- Sometimes it mixes the structure of the document, for instance, put the <chapter> into the <chapter>;
- Sometimes it deletes the tags such as <imageobject>.
Thus, in order the docs with diff markers could be built, the next step is validating and checking the master_output.xml files carefully.
To build the guide with updated/new markers on the TOC, chapters and sections and have the changes highlighted, use the 'diffmk' profile, i.e. the mvn clean install -P diffmk maven command.
To build the release version of the guide (for JBDS release) with updated/new markers on the TOC, use the 'releaseJBDS' profile, i.e. the mvn clean install -P releaseJBDS maven command.