diff --git a/RELEASE.txt b/RELEASE.txt index d29143aa..38fb9533 100644 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -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 ``, + - To show a list contributors, run ``doc/release/contributors.py ``, where ```` is the first commit since the previous release. - Update the version number in ``setup.py`` and ``bento.info`` and commit diff --git a/doc/release/contributors.py b/doc/release/contributors.py new file mode 100755 index 00000000..83c356d3 --- /dev/null +++ b/doc/release/contributors.py @@ -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 diff --git a/doc/release/contributors.sh b/doc/release/contributors.sh deleted file mode 100755 index 023928d3..00000000 --- a/doc/release/contributors.sh +++ /dev/null @@ -1,2 +0,0 @@ -git log $1..HEAD --format='- %aN' | sed 's/@/\-at\-/' | sed 's/<>//' | sort -u -