[FOLIO-397] Document how to update git submodules Created: 30/Nov/16 Updated: 12/Nov/18 Resolved: 06/Dec/16 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | David Crossley | Assignee: | David Crossley |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 6 hours, 25 minutes | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||
| Sprint: | |||||||||
| Description |
|
Some FOLIO repositories utilize "git submodules" for sections of common code. Need to explain how to update such. For example (with DMOD-75) each mod-* module and ram-module-builder include the "raml" repository as a git submodule as its "./raml-util" directory. |
| Comments |
| Comment by David Crossley [ 30/Nov/16 ] |
|
Note that when originally cloning a repository, use 'git clone --recursive ...' |
| Comment by David Crossley [ 30/Nov/16 ] |
|
Thereafter updating that submodule is deliberately not automated, so that we can ensure a stable build when we git checkout in the future. So when an update is needed to be committed, do this: cd mod-configuration (for example) |
| Comment by David Crossley [ 30/Nov/16 ] |
|
Now when people update their local checkout, then some git clients do not automatically update the submodules. So they need to follow with 'git submodule update' This part can be automated with client-side git hooks. Create the following two shell scripts: mod-configuration/.git/hooks/post-checkout using this content: #!/bin/sh git submodule update and make them executable: 'chmod +x post-checkout post-merge' Now subsequent updates will also update the submodules to their declared revision. |
| Comment by David Crossley [ 30/Nov/16 ] |
|
Need to add such documentation at dev.folio.org/doc/setup (
|
| Comment by David Crossley [ 01/Dec/16 ] |
|
See the Discuss topic: |
| Comment by David Crossley [ 06/Dec/16 ] |
|
Added to http://dev.folio.org/doc/setup#update-git-submodules |