Suppress "buildId" to make WebHelp output deterministic
Posted: Thu Oct 20, 2022 3:23 am
When we integrate WebHelp into our tools, the entire WebHelp directory is checked into R&D revision control along with the C code.
Currently, revision control detects every HTML file in the WebHelp output as changed because of differences in "buildId" values as follows:
This causes large checkins (thousands of files) that take a lot of time. This also makes it impossible to meaningfully use the revision history to see just content changes over time.
If I run the following command:
then I can remove these "buildId" values and the HTML files diff identically (except for content changes).
Are these values required for any WebHelp functionality (including invalidating browser caches, etc.), or are they purely informative?
Can WebHelp implement a feature to suppress these values in the output, or is there an easy way to do it that does not involve defining custom transformation types and all the headaches that brings?
Thanks!
Currently, revision control detects every HTML file in the WebHelp output as changed because of differences in "buildId" values as follows:
Code: Select all
diff -r out1/out/dita/topic-3_3_3.html out2/out/dita/topic-3_3_3.html
10c10
< <script src="../oxygen-webhelp/app/options/properties.js?buildId=20221019170411"></script>
---
> <script src="../oxygen-webhelp/app/options/properties.js?buildId=20221019170439"></script>
12c12
< <script src="../oxygen-webhelp/app/search/index/keywords.js?buildId=20221019170411"></script>
---
> <script src="../oxygen-webhelp/app/search/index/keywords.js?buildId=20221019170439"></script>
If I run the following command:
Code: Select all
find out* -name '*.html' -print0 | xargs -0 sed -E -i 's/\?buildId=[0-9]+//'
Are these values required for any WebHelp functionality (including invalidating browser caches, etc.), or are they purely informative?
Can WebHelp implement a feature to suppress these values in the output, or is there an easy way to do it that does not involve defining custom transformation types and all the headaches that brings?
Thanks!