I am working on a custom development Command classes that I plan to put up as a bundle.
Initially the idea is to automate the repetitive time consuming and forgetful moments that go by when working on a sf2 project. So far I have created this command so one can use it like this:
php app/console git:c1 --message="your commit message [completed: 343]" --branch="ClosingTickets"
Instead of this:
git add . && git commit -m "your commit message [completed: 343]" && git push origin ClosingTickets
Or a more longer process which is the whole idea like this:
php app/console git:c2 --message="your commit message [completed: 343]" --branch="ClosingTickets" --new="NextSprint"
Instead of typing to die some flow commands:
git add . git commit -m "your commit message [completed: 343]" git checkout master git pull origin master git merge ClosingTickets git push origin master git checkout -b NextSprint
I have also explored a way to attach some pre-commit hooks like it is done here for formatting code before committing however the formatter code that I like it is not available on the CLI. Perhaps I should use this one provided. But just waiting for the response. Again as I said earlier, the idea is to automate some tasks to save us work. So for instance using pre-commit or post-commit hooks could be a low level automation, whereas sf2 custom commands could be another level of automation. The disadvantage of the pre-commit hook is that it is not as portable and requires work to set it up. The sf2 approach needs some setup now but perhaps less in the future, and if we gather several custom commands on sf2 then we can just use it as a bundle readily available to any project. We want to automate long processes so we can further get analytic-like by products. For instance we could consider developing some commands to use tools to instruct or set some tasks to be run upon demand on a jenkins server or simliar :D!
If you have any ideas please provide them into the comments as they will be helpful into developing more functionality into this already working set of commands. Also I am not sure what git/sf2 flow is best for sf2 development so if you have any ideas please comment below. Thanks!
Some links that I ran into when researching this topic: