drupal-jenkins-demo icon indicating copy to clipboard operation
drupal-jenkins-demo copied to clipboard

Automatically update submodule to the latest commit

Open AlexSkrypnyk opened this issue 11 years ago • 1 comments

Thank you for the great work on this project. It is really amazing time saver!

I've been struggling with the following issue (could not find the answer anywhere): Because build directory is a submodule, every time build script is updated, commit reference in the main project has to be updated (by cd'ing into build dir and pulling changes) and pushed back to main's project, which almost defeats the purpose of linking submodule (the same commit of submodule will be used on every clone).

Is there any way to make git to pull the latest commit of all submodules (or at least 'build') when main project is cloned? Or is there any other way to track some specifi version of submodule such as by submodule's tag (tag can be moved in submodule's repo).

Thank you

AlexSkrypnyk avatar Oct 15 '12 10:10 AlexSkrypnyk

I'm glad you find the project useful.

There is no simple way of solving the problem you describe. That is just the way git submodules work. You could consider using alternate implementations of referencing external projects like braid or just copying the template files into a build folder in your repository.

In general I would hope that there was little need to actually modify the build submodule (that is why it is a template) and that changes/variations between projects could be kept in the build.properties file. If you are developing new features for the build that is obviously not the case.

kasperg avatar Oct 16 '12 19:10 kasperg