How to integrate biicode with git using git hooks

Our users have asked a lot for github integration. This can be easily achieved with git hooks. Git hooks are scripts which are executed when certain actions happen and they can run in the client or the server.

Integrate biicode using git hooks


Using git hooks

For example I want to put my state machine library on github, and I want to publish a new DEV version in biicode each time a push to master. My state machine library is already on biicode, but not in github, so first I create a new github repository and then I go to my block folder and initialize a git repo inside:

Now I can create the hook. In this case we will use the pre-push hook. Pre-action hooks run before the action actually happens. If the hook fails then the action is not performed. Ideally we would prefer to use a post-push hook but git does not support them.

From now on each time time you push to your master branch in github your biicode DEV version will be updated. If you want to freeze a stable version you need to do:

et voila!

Stay tuned

Related Posts
  • Florian Wolters

    Thanks, this works well. Can you demonstrate in another blog post how-to automate tagging, e. g. with the Git post-receive hook? What I want to achieve is, that every time I tag a release in Git, the release is also tagged with biicode.