Issue: it's happened a few times that we modify
js/piwik.js (the original piwik.js) and that we forget to commit to git the minified version
piwik.js of this file.
Goal: create an automated test that will fail when the minified of js/piwik.js is different from the piwik.js found in git.
It might be better to automate the creation of that minified file during the release process for example? Having a minified file open to modification is not the best for security issues (reviewing a pull request affecting those is not easy), it's error prone to keep it up to date and every minification tool works differently.
automating the creation of minified piwik.js sounds best solution! I think we have the requirement of keeping /piwik.js minified in the git repo as people may rely on this (somehow it is API). So doing the minification at release would be too late.
maybe we could automatically commit the minified piwik.js when it is modified in any commit? (the same trick we did to keep travis.yml auto updated could be used to push the minified piwik.js)
Would assetic be an option for you? It works great with symfony. https://github.com/kriswallsmith/assetic
Assetic is running a yuicompressor.jar. This needs to be done before deployment (of course, there's a symfony command).