You could do it manually via a config variable and an intercept method.
resourceversion.go
Create this file in your controllers folder:
package controllers
import (
"github.com/revel/revel"
)
// interceptor method, called before every request.
// Sets a template variable to the resourceVersion read from app.conf
func SetVersion(c *revel.Controller) revel.Result {
c.RenderArgs["resourceVersion"] = revel.Config.StringDefault("resourceVersion", "1")
return nil
}
init.go
In the init() method, append this line:
revel.InterceptMethod(controllers.SetVersion, revel.BEFORE)
templates
In your templates, where you want to use the resource version:
<link rel="stylesheet" type="text/css" href="/public/css/style.css?{{.resourceVersion}}">
app.conf
And finally, the place you will update it - add this line above the dev section to apply to dev and prod, or have a different one in each, whatever suits.
resourceVersion=20150716
I guess you could create a script as part of your build and release process that would automatically edit this config variable.