Tracking Branches in Dependencies
One common use case of
gitman is to track versions of related product sub-components such as a web app that depends on an API.
A web app's
gitman.yml might look something like:
location: vendor sources: - name: api repo: https://github.com/example/api rev: develop sources_locked: - name: api repo: https://github.com/example/api rev: b2730855c9efaaa7448b25b82e5a4363785c83ed
with a working tree that results in something like:
package.json node_modules gitman.yml vendor/api # dependency @ b27308 app tests
Understanding Locked Sources
In the configuration file, the
sources_locked section identifies that commit
b27308 of the API was last used to test this web app -- the last time
$ gitman update was run.
sources section identifies that the
develop branch should be used when checking out a new version of the API.
$ gitman installduring continuous integration to test the web app against a known working API
$ gitman updatelocally to determine if newer versions of the API will break the web app
- When both components are working together, commit