Follow-up to r29036: Now that the "mergeinfo" transaction file is no
[svn.git] / tools / dist / write-announcement.py
blobe0553f05f4f253fdb48e25d4b4f365c0f79eb775
1 #!/usr/bin/python
3 # Creates release announcement text using the contents of:
4 # md5sums
5 # sha1sums
6 # getsigs-output (generate with getsigs.pl)
7 # all of which must be in the current directory.
9 # Writes output to:
10 # announcement.html
11 # announcement.txt
13 ann_text = """\
14 I'm happy to announce Subversion @VERSION@, available from:
16 http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.bz2
17 http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.gz
18 http://subversion.tigris.org/downloads/subversion-@VERSION@.zip
19 http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.bz2
20 http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.gz
21 http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.zip
23 The MD5 checksums are:
25 @MD5SUMS@
27 The SHA1 checksums are:
29 @SHA1SUMS@
31 PGP Signatures are available at:
33 http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.bz2.asc
34 http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.gz.asc
35 http://subversion.tigris.org/downloads/subversion-@VERSION@.zip.asc
36 http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.bz2.asc
37 http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.gz.asc
38 http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.zip.asc
40 For this release, the following people have provided PGP signatures:
42 @SIGINFO@
44 The Windows binary packages are also available:
46 http://subversion.tigris.org/downloads/svn-win32-@VERSION@.zip
47 http://subversion.tigris.org/downloads/svn-win32-@VERSION@_dev.zip
48 http://subversion.tigris.org/downloads/svn-win32-@VERSION@_javahl.zip
49 http://subversion.tigris.org/downloads/svn-win32-@VERSION@_pdb.zip
50 http://subversion.tigris.org/downloads/svn-win32-@VERSION@_pl.zip
52 Release notes for the 1.4.x release series may be found at:
54 http://subversion.tigris.org/svn_1.4_releasenotes.html
56 You can find list of changes between @VERSION@ and earlier versions at:
58 http://svn.collab.net/repos/svn/tags/@VERSION@/CHANGES
60 Questions, comments, and bug reports to users@subversion.tigris.org.
62 Thanks,
63 - The Subversion Team
64 """
66 ann_html = """\
67 <p>I'm happy to announce Subversion @VERSION@, available from:</p>
69 <dl>
70 <dd>http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.bz2</dd>
71 <dd>http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.gz</dd>
72 <dd>http://subversion.tigris.org/downloads/subversion-@VERSION@.zip</dd>
73 <dd>http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.bz2</dd>
74 <dd>http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.gz</dd>
75 <dd>http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.zip</dd>
76 </dl>
78 <p>The MD5 checksums are:</p>
79 <dl>
80 @MD5SUMS@
81 </dl>
83 <p>The SHA1 checksums are:</p>
85 <dl>
86 @SHA1SUMS@
87 </dl>
89 <p>PGP Signatures are available at:</p>
91 <dl>
92 <dd>http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.bz2.asc</dd>
93 <dd>http://subversion.tigris.org/downloads/subversion-@VERSION@.tar.gz.asc</dd>
94 <dd>http://subversion.tigris.org/downloads/subversion-@VERSION@.zip.asc</dd>
95 <dd>http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.bz2.asc</dd>
96 <dd>http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.tar.gz.asc</dd>
97 <dd>http://subversion.tigris.org/downloads/subversion-deps-@VERSION@.zip.asc</dd>
98 </dl>
100 <p>For this release, the following people have provided PGP signatures:</p>
102 <dl>
103 @SIGINFO@
104 </dl>
106 <p>The Windows binary packages are also available:</p>
108 <dl>
109 <dd>http://subversion.tigris.org/downloads/svn-win32-@VERSION@.zip</dd>
110 <dd>http://subversion.tigris.org/downloads/svn-win32-@VERSION@_dev.zip</dd>
111 <dd>http://subversion.tigris.org/downloads/svn-win32-@VERSION@_javahl.zip</dd>
112 <dd>http://subversion.tigris.org/downloads/svn-win32-@VERSION@_pdb.zip</dd>
113 <dd>http://subversion.tigris.org/downloads/svn-win32-@VERSION@_pl.zip</dd>
114 </dl>
116 <p>Release notes for the 1.4.x release series may be found at:</p>
118 <dl><dd>http://subversion.tigris.org/svn_1.4_releasenotes.html</dd></dl>
120 <p>You can find list of changes between @VERSION@ and earlier versions at:</p>
122 <dl><dd>http://svn.collab.net/repos/svn/tags/@VERSION@/CHANGES</dd></dl>
125 import sys
127 def fmtsums_text(sumlist):
128 return "\n".join(map(lambda x: " " + x, sumlist))
130 def fmtsums_html(sumlist):
131 return "\n".join(map(lambda x: "<dd>" + x + "</dd>", sumlist))
133 def main():
134 global ann_text
135 global ann_html
136 version = sys.argv[1]
137 md5sums = []
138 sha1sums = []
139 siginfo = []
140 for line in open('md5sums'):
141 if line.find('subversion-') == -1:
142 continue
143 md5sums.append(line.strip('\n'))
144 for line in open('sha1sums'):
145 if line.find('subversion-') == -1:
146 continue
147 sha1sums.append(line.strip('\n'))
148 for line in open('getsigs-output'):
149 siginfo.append(line.rstrip('\n'))
151 ann_text = ann_text.replace('@VERSION@', version)
152 ann_html = ann_html.replace('@VERSION@', version)
153 ann_text = ann_text.replace('@MD5SUMS@', fmtsums_text(md5sums))
154 ann_text = ann_text.replace('@SHA1SUMS@', fmtsums_text(sha1sums))
155 ann_html = ann_html.replace('@MD5SUMS@', fmtsums_html(md5sums))
156 ann_html = ann_html.replace('@SHA1SUMS@', fmtsums_html(sha1sums))
158 ann_text = ann_text.replace('@SIGINFO@', "\n".join(siginfo))
159 htmlsigs = []
160 for i in range(0, len(siginfo), 2):
161 htmlsigs.append("<dd>" + siginfo[i].strip() + "\n" +
162 siginfo[i+1].strip() + "</dd>")
163 ann_html = ann_html.replace('@SIGINFO@', "\n".join(htmlsigs))
165 open('announcement.txt', 'w').write(ann_text)
166 open('announcement.html', 'w').write(ann_html)
168 if __name__ == '__main__':
169 main()