annotate README.md @ 5:9c6605b1619b draft default tip

Make directories absolute and expand tilde-paths.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 12 May 2015 23:55:27 -0700
parents 455043eb436a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 # SEPTEMBER
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 September is a program that takes a source controlled project, goes back to
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 specific points in that project's timeline, and does something.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 This is typically useful for generating documentation for each released version
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8 of a project, but it can do other stuff like report on how the code evolved over
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 time in terms of amount or complexity.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12 ## Usage
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14 You simply run it by pointing at your repo:
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 python september.py /path/to/repo --command "foo bar"
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 By default, this will clone your repository into a temporary directory (which
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19 you can override with the `--tmp-dir` argument), update back to every tag, and
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 run `foo bar` each time at the root of the clone.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21
3
455043eb436a More info in the README.
Ludovic Chabant <ludovic@chabant.com>
parents: 2
diff changeset
22 If you already ran September previously, however, it will only run the command
455043eb436a More info in the README.
Ludovic Chabant <ludovic@chabant.com>
parents: 2
diff changeset
23 on any new/changed tag. You can see what September remembers by using the
455043eb436a More info in the README.
Ludovic Chabant <ludovic@chabant.com>
parents: 2
diff changeset
24 `--status` argument.
455043eb436a More info in the README.
Ludovic Chabant <ludovic@chabant.com>
parents: 2
diff changeset
25
2
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26 September will guess what kind of repository you're giving it, and do the
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 appropriate things to clone and update it. Right now Git and Mercurial are
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 supported.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
30
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31 ## Configuration file
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33 You can pass a configuration file to September with the `--config` argument. If
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34 you have a `.september.cfg` file at the root of your repository, it will pick it
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35 up automatically otherwise.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37 The configuration file must specify settings in a `september` section:
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
38
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
39 [september]
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40 command = echo "Processing tag %(tag)s..."
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 use_shell = 1
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 Supported configuration settings include:
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
44
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
45 * `command`: The command to run. Use `%(tag)s` to insert the name of current tag
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
46 in the command.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
47 * `use_shell`: Whether the command should be passed to a shell (_e.g._ if using
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
48 shell commands like `ls` or `echo`, or using pipes or redirection).
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
49 * `first_tag`: Don't update to tags older than the tag specified as the first
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
50 tag.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
51 * `tag_pattern`: A regular expression that defines which tags to consider. Any
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
52 tag that _doesn't_ match the pattern will be ignored.
08dfce548a9f Add a README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
53