summaryrefslogtreecommitdiff
path: root/deps/uv/tools
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-05-30 13:19:11 -0400
committercjihrig <cjihrig@gmail.com>2017-06-07 09:30:01 -0400
commitedd541957f6bb6fa4ccb56bd1f878172f631ce36 (patch)
tree2a72ce78b05fc122c699d547152414f45d2cc16c /deps/uv/tools
parent12e39d6d943348a19da1bf84d4891aa28cd3ffb6 (diff)
downloadandroid-node-v8-edd541957f6bb6fa4ccb56bd1f878172f631ce36.tar.gz
android-node-v8-edd541957f6bb6fa4ccb56bd1f878172f631ce36.tar.bz2
android-node-v8-edd541957f6bb6fa4ccb56bd1f878172f631ce36.zip
deps: upgrade libuv to 1.12.0
Fixes: https://github.com/nodejs/node/issues/12853 Fixes: https://github.com/nodejs/node/issues/854 PR-URL: https://github.com/nodejs/node/pull/13306 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/uv/tools')
-rw-r--r--deps/uv/tools/make_dist_html.py124
1 files changed, 124 insertions, 0 deletions
diff --git a/deps/uv/tools/make_dist_html.py b/deps/uv/tools/make_dist_html.py
new file mode 100644
index 0000000000..7a19d3e115
--- /dev/null
+++ b/deps/uv/tools/make_dist_html.py
@@ -0,0 +1,124 @@
+#!/usr/bin/python
+
+from __future__ import print_function
+
+import itertools
+import os
+import re
+import subprocess
+
+HTML = r'''
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="http://libuv.org/styles/vendor.css">
+ <link rel="stylesheet" href="http://libuv.org/styles/main.css">
+ <style>
+ table {{
+ border-spacing: 0;
+ }}
+ body table {{
+ margin: 0 0 0 12pt;
+ }}
+ th, td {{
+ padding: 2pt;
+ text-align: left;
+ vertical-align: top;
+ }}
+ table table {{
+ border-collapse: initial;
+ padding: 0 0 16pt 0;
+ }}
+ table table tr:nth-child(even) {{
+ background-color: #777;
+ }}
+ </style>
+ </head>
+ <body>
+ <table>{groups}</table>
+ </body>
+</html>
+'''
+
+GROUPS = r'''
+<tr>
+ <td>{groups[0]}</td>
+ <td>{groups[1]}</td>
+ <td>{groups[2]}</td>
+ <td>{groups[3]}</td>
+</tr>
+'''
+
+GROUP = r'''
+<table>
+ <tr>
+ <th>version</th>
+ <th>tarball</th>
+ <th>gpg</th>
+ <th>windows</th>
+ </tr>
+ {rows}
+</table>
+'''
+
+ROW = r'''
+<tr>
+ <td>
+ <a href="http://dist.libuv.org/dist/{tag}/">{tag}</a>
+ </td>
+ <td>
+ <a href="http://dist.libuv.org/dist/{tag}/libuv-{tag}.tar.gz">tarball</a>
+ </td>
+ <td>{maybe_gpg}</td>
+ <td>{maybe_exe}</td>
+</tr>
+'''
+
+GPG = r'''
+<a href="http://dist.libuv.org/dist/{tag}/libuv-{tag}.tar.gz.sign">gpg</a>
+'''
+
+# The binaries don't have a predictable name, link to the directory instead.
+EXE = r'''
+<a href="http://dist.libuv.org/dist/{tag}/">exe</a>
+'''
+
+def version(tag):
+ return map(int, re.match('^v(\d+)\.(\d+)\.(\d+)', tag).groups())
+
+def major_minor(tag):
+ return version(tag)[:2]
+
+def row_for(tag):
+ maybe_gpg = ''
+ maybe_exe = ''
+ # We didn't start signing releases and producing Windows installers
+ # until v1.7.0.
+ if version(tag) >= version('v1.7.0'):
+ maybe_gpg = GPG.format(**locals())
+ maybe_exe = EXE.format(**locals())
+ return ROW.format(**locals())
+
+def group_for(tags):
+ rows = ''.join(row_for(tag) for tag in tags)
+ return GROUP.format(rows=rows)
+
+# Partition in groups of |n|.
+def groups_for(groups, n=4):
+ html = ''
+ groups = groups[:] + [''] * (n - 1)
+ while len(groups) >= n:
+ html += GROUPS.format(groups=groups)
+ groups = groups[n:]
+ return html
+
+if __name__ == '__main__':
+ os.chdir(os.path.dirname(__file__))
+ tags = subprocess.check_output(['git', 'tag'])
+ tags = [tag for tag in tags.split('\n') if tag.startswith('v')]
+ tags.sort(key=version, reverse=True)
+ groups = [group_for(list(g)) for _, g in itertools.groupby(tags, major_minor)]
+ groups = groups_for(groups)
+ html = HTML.format(groups=groups).strip()
+ html = re.sub('>\\s+<', '><', html)
+ print(html)