Skip to content

Instantly share code, notes, and snippets.

@lavoiesl
Created October 24, 2012 18:02
Show Gist options
  • Save lavoiesl/3947737 to your computer and use it in GitHub Desktop.
Save lavoiesl/3947737 to your computer and use it in GitHub Desktop.

Revisions

  1. lavoiesl created this gist Oct 24, 2012.
    9 changes: 9 additions & 0 deletions assets_version.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <?php
    // app/config/assets_version.php

    $container->loadFromExtension('framework', array(
    'templating' => array(
    'engines' => array('twig'),
    'assets_version' => exec('git rev-parse --short HEAD'),
    ),
    ));
    6 changes: 6 additions & 0 deletions config.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # app/config/config.yml

    imports:
    - { resource: parameters.yml }
    #...
    - { resource: assets_version.php }