Generating a list of changes between releases
Posted: Mon Nov 16, 2020 10:46 am
Hi,
We have a requirement to generate a list of changes between releases. So I am referring to below blog by Radu,https://blog.oxygenxml.com/topics/dita- ... -list.html .
I got confused at last but one step i.e,
Open the build file com.oxygenxml.ant.parser.dita/resources/build.xml in Oxygen XML Editor. The build file has three stages which may need to be slightly changed to fit your project's structure:
Run the git command in your project's folder and find all differences related to a certain branch. In my case the branch is called oxygen22.0 so it needs to be changed to your particular branch name.
Apply the XSLT stylesheet createChangesTopic.xsl on the changes list and generate a DITA topic. You will need to make changes to the stylesheet so that the generated paths to the changed topics are relative to the place where the generated DITA topic is located.
Run an XSLT stylesheet on the DITA topic to add the @class attributes.
Do we need to add the 'git diff --names-only <branch-name>' command results to a topic manually?
Do we need to apply the XSLT stylesheet createChangesTopic.xsl on the changes list manually?
I've updated the build.xml as below,
Added the topicref in main ditamap as below,
When I generate the PDF, I don't see expected new topic in the PDF output guide.
It would be great if you can suggest any clue.
Thanks and regards,
Samba.
We have a requirement to generate a list of changes between releases. So I am referring to below blog by Radu,https://blog.oxygenxml.com/topics/dita- ... -list.html .
I got confused at last but one step i.e,
Open the build file com.oxygenxml.ant.parser.dita/resources/build.xml in Oxygen XML Editor. The build file has three stages which may need to be slightly changed to fit your project's structure:
Run the git command in your project's folder and find all differences related to a certain branch. In my case the branch is called oxygen22.0 so it needs to be changed to your particular branch name.
Apply the XSLT stylesheet createChangesTopic.xsl on the changes list and generate a DITA topic. You will need to make changes to the stylesheet so that the generated paths to the changed topics are relative to the place where the generated DITA topic is located.
Run an XSLT stylesheet on the DITA topic to add the @class attributes.
Do we need to add the 'git diff --names-only <branch-name>' command results to a topic manually?
Do we need to apply the XSLT stylesheet createChangesTopic.xsl on the changes list manually?
I've updated the build.xml as below,
Code: Select all
<target name="dist">
<dirname property="baseFolder" file="${input.file}"/>
<!-- Find out all changes in the project -->
<exec executable="git" dir="${baseFolder}/../">
<arg line="diff --name-only master"/>
<redirector output="${baseFolder}/[b]dynamicChangeHistory.gen.dita[/b]" alwayslog="true"/>
</exec>
<!-- Create the topic containing the list of changes -->
<xslt in="createChangesTopic.xsl" style="createChangesTopic.xsl" out="${output.file.temp1}">
<param name="pathToChangesFile" expression="${baseFolder}/[b]dynamicChangeHistory.gen.dita[/b]"/>
<xmlcatalog>
<catalogpath path="../../../catalog-dita.xml"/>
</xmlcatalog>
</xslt>
<!-- Now expand @class attributes in DITA content -->
<xslt in="${output.file.temp1}" out="${output.file}" style="identity.xsl">
<xmlcatalog>
<catalogpath path="../../../catalog-dita.xml"/>
</xmlcatalog>
</xslt>
</target>
Code: Select all
<topicref href="dynamicChangeHistory.gen.dita" format="ant-parser"/>
It would be great if you can suggest any clue.
Thanks and regards,
Samba.