Project

General

Profile

HOWTO write the release notes » History » Version 3

Loïc Dachary, 04/16/2015 07:02 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
print
17
print "-" * 10
18
print
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
            print
46
            found += 1
47
48
print
49
print "-" * 10
50
print
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 2 Loïc Dachary
* backport the release notes to the release branch when they are final. Ideally this is done before the point release is published. If not it can be backported shortly afterwards.
56 1 Loïc Dachary
* add the release to the "timeline":https://github.com/ceph/ceph/blob/master/doc/release.rst
57 3 Loïc Dachary
* the release notes come with an introduction that "is prepared in a separate file":https://github.com/ceph/ceph/blob/master/PendingReleaseNotes . It can be edited if something significant must not be forgotten and it does not need to well written because it is a draft.