1

This may seem like an odd request but hear me out... I maintain a framework called Kickoff (https://github.com/tmwagency/kickoff) and every time I push to the master I would like to push one or a few subdirectories to other Kickoff-related repos that I also maintain. These are https://github.com/tmwagency/kickoff-statix and https://github.com/tmwagency/generator-kickoff. In both cases I would like the scss directory to be pushed to the other repos. This would cut out some manual labour and hopefully allow the two other repos to always be up-to-date.

I have Travis setup already, but I am not familiar enough with git internals to know if this is possible. If it is not, is there another way for me to achieve what I want?

Many thanks

Zander
  • 2,471
  • 3
  • 31
  • 53

1 Answers1

0

I'd recommend you to integrate your sub-projects as git-submodules.

Using submodules you could use the after_success-hook for a push by opening the submodule-directory and invoking a git push.

Travis-CI also supports the build-cycle-update of your submodules which pulls the changes in the submodules into your super-project. But it sounds like you just want to push your stuff out of the build.

Community
  • 1
  • 1
Florian Neumann
  • 5,587
  • 1
  • 39
  • 48
  • Thanks @florianb, I thought I would need to use submodules. One question though, are you suggesting that my other projects (generator-kickoff and kickoff-statix) are the submodules or the `scss` directory? Thanks again – Zander Apr 30 '14 at 16:22
  • Hi @Zander, i would reflect the real world-dependencies. So if your `scss/`-directory is going to be used in several other projects this might be a hint to let it become a submodule. – Florian Neumann May 06 '14 at 09:24
  • I think you're right but I think I'd rather keep everything together than not. Cheers again – Zander May 06 '14 at 13:26
  • @Zander - you're welcome. I must confess that creating a sub-directory no elegant way to handle your problem - the way submodules work is often criticized. Another solution could be a partial merge-in from your subprojects, using `git read-tree` which allows your sub-projects to merge directories in. Since you're looking for a travis-triggered solution, it may be difficult to implement a build-trigger. – Florian Neumann May 07 '14 at 08:59
  • just had a look at `git read-tree`, it might be just what I need. Thanks – Zander May 08 '14 at 14:58