we6lqg
Last Updated: February 25, 2016
·
996
· jenkoian
A208c6ddf9836a1e2a32a0dab0362713

Symfony2 deployment parameter diff

We automate as much of our Symfony2 deployment as possible. The only manual part of the process is adding any newly added parameters to parameters.yml.

We therefore require a way of seeing what parameters have been added between releases. This very simple command does exactly that. Just replace $1 and $2 with the tags/branches/commits you wish to compare.

git diff $1:app/config/parameters.yml.dist $2:app/config/parameters.yml.dist --color=auto -p

This will give you a patch, so you can output this to a patch file and patch your parameters.yml file for convenience. Just remember to add any variable data such as database settings etc.

Of course this is applicable to creating a diff of any file on any project, but this is something we constantly found ourselves doing when deploying a Symfony2 app.

Alternatively (and what we did to start with) you can use github by simply adding compare/$1...$2 (http://github.com/path/to/my/project/compare/1...2 for example) on to the end of your github url and then searching for the parameters.yml file.

Say Thanks
Respond

1 Response
Add your response

7155
598ecfd8824fb31c9a6fdaa480e811d6

I use git diff $1..$2 -- app/config/parameters.yml.dist

over 1 year ago ·