This provides a Helix Server pre-commit (change-content) trigger that validates web fles upon attempted submit, and rejects those that fail validation.
Validation of web content is done using tidy HTML Tidy.
This is installed with a Perforce Triggers table entry like the following:
<PRE>
</PRE>
Files with .html and .inc extensions are considered web files.
Dependencies:
It is recommend this be deployed along with the Perforce Server Deployment Package, though there is no hard dependency.
Install the bash shell script on your server, and confiure a Triggers table entry to call it, as per the example above.
Web File Validator using Tidy === Overview --- This provides a Helix Server pre-commit (change-content) trigger that validates web fles upon attempted submit, and rejects those that fail validation. Validation of web content is done using tidy [HTML Tidy](http://www.html-tidy.org/). This is installed with a Perforce Triggers table entry like the following: <PRE> # Triggers: # wfv_tidy change-content //path/... "/p4/common/bin/triggers/wfv_tidy.sh %changelist%" </PRE> Web Files --- Files with *.html and *.inc extensions are considered web files. Dependencies --- Dependencies: * The /bin/bash be bash 4.0 or greater. * The 'tidy' utility must be installed and available in the PATH. A tidy package is available on many moder OS distributions, including Mac and Linux. * The 'p4' executable installed and available in the PATH. * The Helix Server connection settings (P4PORT, P4USER) and a valid ticket must exist. It is recommend this be deployed along with the Perforce Server Deployment Package, though there is no hard dependency. Installation --- Install the bash shell script on your server, and confiure a Triggers table entry to call it, as per the example above.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 17302 | C. Thomas Tyler | Refactored: Moved LICENSE and README.md files up on level. | ||
//guest/tom_tyler/wfv-tidy/main/src/README.md | |||||
#1 | 17301 | C. Thomas Tyler |
Added README.md and LICENSE file. Added initial version of wfv_tidy.sh, still a work in progress. |