2
|
1
|
|
2 # SEPTEMBER
|
|
3
|
|
4 September is a program that takes a source controlled project, goes back to
|
|
5 specific points in that project's timeline, and does something.
|
|
6
|
|
7 This is typically useful for generating documentation for each released version
|
|
8 of a project, but it can do other stuff like report on how the code evolved over
|
|
9 time in terms of amount or complexity.
|
|
10
|
|
11
|
|
12 ## Usage
|
|
13
|
|
14 You simply run it by pointing at your repo:
|
|
15
|
|
16 python september.py /path/to/repo --command "foo bar"
|
|
17
|
|
18 By default, this will clone your repository into a temporary directory (which
|
|
19 you can override with the `--tmp-dir` argument), update back to every tag, and
|
|
20 run `foo bar` each time at the root of the clone.
|
|
21
|
|
22 September will guess what kind of repository you're giving it, and do the
|
|
23 appropriate things to clone and update it. Right now Git and Mercurial are
|
|
24 supported.
|
|
25
|
|
26
|
|
27 ## Configuration file
|
|
28
|
|
29 You can pass a configuration file to September with the `--config` argument. If
|
|
30 you have a `.september.cfg` file at the root of your repository, it will pick it
|
|
31 up automatically otherwise.
|
|
32
|
|
33 The configuration file must specify settings in a `september` section:
|
|
34
|
|
35 [september]
|
|
36 command = echo "Processing tag %(tag)s..."
|
|
37 use_shell = 1
|
|
38
|
|
39 Supported configuration settings include:
|
|
40
|
|
41 * `command`: The command to run. Use `%(tag)s` to insert the name of current tag
|
|
42 in the command.
|
|
43 * `use_shell`: Whether the command should be passed to a shell (_e.g._ if using
|
|
44 shell commands like `ls` or `echo`, or using pipes or redirection).
|
|
45 * `first_tag`: Don't update to tags older than the tag specified as the first
|
|
46 tag.
|
|
47 * `tag_pattern`: A regular expression that defines which tags to consider. Any
|
|
48 tag that _doesn't_ match the pattern will be ignored.
|
|
49
|