HOWTO write the release notes » History » Version 1
Loïc Dachary, 03/29/2015 06:40 PM
1 | 1 | Loïc Dachary | * git clone -b release (for instance git clone -b dumpling http://github.com/ceph/ceph) |
---|---|---|---|
2 | * run the following to get a base to work on |
||
3 | <pre> |
||
4 | #!/usr/bin/env python |
||
5 | |||
6 | import re |
||
7 | |||
8 | # Needs https://github.com/gitpython-developers/GitPython, pip install gitpython |
||
9 | from git import Repo |
||
10 | |||
11 | repo = Repo('.') |
||
12 | |||
13 | active_branch = repo.active_branch.name |
||
14 | |||
15 | print "active_branch: " + active_branch |
||
16 | |||
17 | print "-" * 10 |
||
18 | |||
19 | |||
20 | version_pattern = re.compile("\d+\.\d+(\.\d+)?") |
||
21 | signed_off_pattern = re.compile("Signed-off-by: (.+) <") |
||
22 | fixes_pattern = re.compile("Fixes: (#\d+(, #\d+)*)") |
||
23 | |||
24 | found = 0 |
||
25 | |||
26 | def to_line(commit): |
||
27 | return "* `{0}<http://github.com/ceph/ceph/commit/{1}>`_".format(commit.summary, str(commit)) |
||
28 | |||
29 | # List all commits in Git log up to the latest 0.mm.nn tag |
||
30 | for commit in list(repo.iter_commits(active_branch)): |
||
31 | if version_pattern.match(commit.summary): |
||
32 | break |
||
33 | else: |
||
34 | line = to_line(commit) |
||
35 | fixes = ["`#{0}<http://tracker.ceph.com/issues/{0}>`_".format(issue_number[1:]) |
||
36 | for sublist in fixes_pattern.finditer(commit.message) |
||
37 | for issue_number in sublist.group(1).split(", ") |
||
38 | ] |
||
39 | signers = signed_off_pattern.findall(commit.message) |
||
40 | if signers: |
||
41 | fixes.append(", ".join(signers)) |
||
42 | if fixes or signers: |
||
43 | line = line + " (" + " ".join(fixes) + ")" |
||
44 | print line |
||
45 | |||
46 | found += 1 |
||
47 | |||
48 | |||
49 | print "-" * 10 |
||
50 | |||
51 | print "Found {0} commits matching \"Fixes:\" or \"Signed-off-by:\"".format(found) |
||
52 | </pre> |
||
53 | * manual edit the list of commits |
||
54 | * add a section in http://docs.ceph.com/docs/master/release-notes/ in the *master* branch of ceph in the "release-notes.rst":https://github.com/ceph/ceph/blob/master/doc/release-notes.rst file with the list of commits |
||
55 | * add the release to the "timeline":https://github.com/ceph/ceph/blob/master/doc/release.rst |