I have installed gitlab (manually) at ubuntu 12.04.
There are some repositories that contain PSD (Adobe photoshop files). What we hope to achieve is that whenever someone is pushing a commit to the gitlab server, it will automatically:
- Convert PSD to PNG
- Move to PSD to dropbox (or other cloud storage)
- Remove PSD from the commit
- Add the PNG to the commit
Note: Step 2 is irrelevant to this question.
Anyway, we have managed to download tools to convert PSD to PNG which involves installing Ruby, some Ruby Gems, and PSD.rb (Google PSD.rb if anyone is interested)
The problem is we do not wish to manage the installations (Ruby, gems, and etc.) on client side as we assume it will be hard for us to maintain the installations on a number of windows, mac, and linux machines.
So what we are hoping to achieve is that the above will be executed in server side hooks when someone do a git push and there are PSD files in the commit.
We have tried to do that in pre-receive hook but we can't manage to modify the contents of the commit (e.g. remove PSD from commit, Add new file - PNG to the commit)
Is there any other way to do the above on server side? Or there are other methods we can explore?