1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
codetree
========
Codetree is a tool for assembling directories of code from disparate sources. You might, for example, want to keep your application code separate from your deployment code and local configuration, then bring them all together as part of your build process. Codetree helps you do that.
Usage
-----
Codetree assumes that you'd like to assemble your code in the current working directory. It expects a configuration file whose syntax is detailed below.
Configuration Files
-------------------
[Config-manager](https://launchpad.net/config-manager) configuration files should be compatible with codetree. Codetree has a few more features, and therefore some additional config syntax.
See `codetree --help` for details of the configuration file format.
### Source URLs
There are currently five handlers, each registered for a number of URL schemes:
* Bzr: bzr, bzr+ssh, lp, bzr+http, bzr+https
* HTTP/S: http, https
* Local: (empty scheme)
* Git: git, git+http, git+https, git+lp, git+ssh
* Charm Store: cs
If you're familiar with Bzr, you'll note that bzr+http and bzr+https are not valid schemes for Bzr URLs. No two handlers may handle the same scheme. In order to definitively identify the handler you want for a source, the scheme you use may be slightly non-standard.
Similarly git+http, git+https and git+lp are not valid schemas for git URLs, but are used in codetree for exactly the same reason.
Other handlers are planned, such as an archive handler (variant of the http/s handler).
### Source options
Sources may accept various arguments. As in the lp:myapp-woohoo example above, you see that they come at the end of the source, separated by a semicolon. Arguments take the form key=value. More than one option is comma separated.
Supported options are:
revno: Checkout a specific revision. For Git branches this is any git branch, tag or ref understood by git checkout, defaulting to master. The charm store does not support revno as the revision is specified as part of the url.
overwrite: If the destination directory already exists, just overwrite it. Otherwise it is an error.
**Git Only**
depth: Use "git clone --depth n" to create a shallow clone only up to n revisions.
branch: Use "git clone -b <branch> --single-branch" to clone a single branch rather than clone all then checkout.
**BZR Only**
lightweight: Use "bzr checkout --lightweight" rather than "bzr branch". Only supported for Bazaar branches.
**Local Only**
method: copy, rsync, link or hardlink - rsync is default
Copy does not remove files, rsync will. The method link uses a symbolic link, hardlink obviously a
hardlink.
**Charm Store Only**
base_url: By default it is assumed to be the public store 'https://api.jujucharms.com/charmstore/v5' so few will need to modify this. Note only https is always supported.
channel: By default it is assumed to be the stable channel, you can specify 'unpublished', 'edge', 'beta', 'candidate', or 'stable'. Note that because there is no charmstore auth at the moment they must be granted read access to everyone.
|