-
Notifications
You must be signed in to change notification settings - Fork 33
Ad hoc Dependencies
The most common type of dependency comes from one of the hosted Git services (GitHub, GitLab, BitBucket), but this is not an option in all situations. For this reason, Buckaroo also supports "ad-hoc" dependencies, which are dependencies directly on Git.
Ad-hoc dependencies are not currently supported in the CLI (issue), so you will need to write some TOML.
Suppose you wanted to add a dependency on git@url/to/git/repo.git
.
First, you must choose a name of the form owner/project
, then add a location
entry to buckaroo.toml
in your project:
[[location]]
package = "owner/project"
git = "git@url/to/git/repo.git"
This location
entry tells Buckaroo how to fetch versions when it encounters a project called owner/project
. This also works transitively, so consumers of your package will be able to use owner/project
too. Therefore, you should try to pick a globally unique name.
Dependencies are added with the usual TOML syntax, so your final buckaroo.toml
might look like this:
[[location]]
package = "owner/project"
git = "git@url/to/git/repo.git"
[[dependency]]
package = "owner/project"
version = "branch=master"
Note that if different locations are specified for the same name then Buckaroo will not be able to resolve. In the future this will be enhanced using a "priority" system.