Created
November 28, 2011 16:11
-
-
Save jakzal/1400923 to your computer and use it in GitHub Desktop.
Updating assets version before assetic dump (capifony)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :symfony do | |
namespace :assets do | |
desc "Updates assets version" | |
task :update_version do | |
run "sed -i 's/\\(assets_version: \\)\\(.*\\)$/\\1 #{real_revision}/g' #{latest_release}/app/config/config.yml" | |
end | |
end | |
end | |
before "symfony:assetic:dump" do | |
symfony.assets.update_version | |
end |
It's used for cache busting. More in the docs: http://symfony.com/doc/2.0/reference/configuration/framework.html#assets-version
Thanks. I'll use this 'sed ..' command with ant :)
Awesome, thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i have not read about assets_version: what it does?