Custom Typo3 Theme Githooks for easier Developments within Teams.
- Go to your Typo3 ext folder:
cd typo3conf/ext/<yourThemeFolder>
- Clone the Typo3 Theme Githooks Project to your Theme:
git clone https://github.com/iocron/typo3-theme-githooks.git .githooks
- Set the new hooks Path:
git config core.hooksPath .githooks
- Try it out:
- 4.1 Try pulling / merging something and the .githooks should get triggered
- 4.2 Or try/execute the post-merge script directly:
bash .githooks/post-merge
(Note: If any problems occur, then please check the logs in .githooks/logs)
Current available Githooks:
- post-merge:
- Executes a filesync of new fileadmin files in the theme everytime a pull, merge, etc. is going on (usually it syncs from /Initialisation/Files/ to /fileadmin//)
- Installs https://github.com/iocron/typo3-gulp-scss and it's dependencies (then you can list some gulp commands with
gulp --tasks
)
- Empty typo3Root/typo3temp/* (except index.html)
- Auto Install of Typo3 Deployer
- More Hooks for different jobs (e.g. scss?!)
- Auto-Update/Self-Update (Pull) on post-merge of .githooks?!
- Need some feedback :)