mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 18:10:25 +08:00
Rewrite contributor lister in Python.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ How to make a new release of ``skimage``
|
||||
|
||||
- Update release notes.
|
||||
|
||||
- To show a list contributors, run ``doc/release/contributors.sh <commit>``,
|
||||
- To show a list contributors, run ``doc/release/contributors.py <commit>``,
|
||||
where ``<commit>`` is the first commit since the previous release.
|
||||
|
||||
- Update the version number in ``setup.py`` and ``bento.info`` and commit
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
import sys
|
||||
import string
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print "Usage: ./contributors.py tag-of-previous-release"
|
||||
sys.exit(-1)
|
||||
|
||||
tag = sys.argv[1]
|
||||
|
||||
cmd = "git log %s..HEAD --format=%%aN"
|
||||
authors = subprocess.check_output((cmd % tag).split()).split('\n')
|
||||
authors = [a.strip() for a in authors if a.strip()]
|
||||
|
||||
def key(author):
|
||||
author = [v for v in author.split() if v[0] in string.letters]
|
||||
return author[-1]
|
||||
|
||||
authors = sorted(set(authors), key=key)
|
||||
|
||||
for a in authors:
|
||||
print '-', a
|
||||
@@ -1,2 +0,0 @@
|
||||
git log $1..HEAD --format='- %aN' | sed 's/@/\-at\-/' | sed 's/<>//' | sort -u
|
||||
|
||||
Reference in New Issue
Block a user