We're using Greenscript 1.2.8b on Play 1.2.5 to minify and combine JavaScript and CSS files. I was investigating some caching issues we ran into and noticed the file names Greenscript generates don't seem to change when we deploy a new version.
Is there any way we can force it to generate a new file name for the combined JS or CSS file when the contents change?
Edit: I accepted the answer below, because it should work for most people. However, it was messing up paths in my CSS, so I ended up with something slightly different. I added the following line to my application.conf:
greenscript.url.minimized=/gs/VERSION
And in my build script I replace VERSION with the latest version number from source control.
according to https://groups.google.com/forum/#!msg/play-framework/1saij-OP1go/grzGIoBXSTAJ, you can try the following approach:
Add the following line to the routes file:
GET /public/%{out.write(play.getVirtualFile(".version").contentAsString())}%/ staticDir:public
Add the following configuration to application.conf
:
greenscript.router.mapping=true