@mattab opened this Issue on June 24th 2015 Member

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.

Usually we detect these problems before the stable release, but it is likely that in the future we will forget and release a new Piwik version with some "missing bug fix" in the Javascript client.

Goal: create an automated test that will fail when the minified of js/piwik.js is different from the piwik.js found in git.

@mnapoli commented on June 24th 2015 Contributor

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.

@mattab commented on June 25th 2015 Member

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)

@thomaszbz commented on June 27th 2015

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).

This Issue was closed on March 31st 2016
Powered by GitHub Issue Mirror