guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generate 'AUTHORS'


From: Alex Kost
Subject: Generate 'AUTHORS'
Date: Mon, 29 Jun 2015 22:26:01 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ludovic Courtès (2015-06-28 23:43 +0300) wrote:

> I think we should consider generating ‘AUTHORS’ upon ‘make dist’
> eventually, ideally with a list of those who contributed to the last
> release, and then the list of all those who contributed at all.  Any
> takers?  :-)

I can try.  IIUC it requires:

- adding a script (let's say "generate-authors.scm") into "build-aux"
  directory that will call an appropriate "git log" command and mess
  with its output; something like this:

(use-modules (ice-9 popen)
             (ice-9 rdelim)
             (srfi srfi-1))

(define* (authors #:optional (range "HEAD"))
  "Return a list of authors for commit RANGE."
  (let* ((port (open-pipe* OPEN_READ
                           "git" "log" "--format=%aN <%aE>" range))
         (output (read-string port)))
    (close-port port)
    (let ((authors (string-split output #\newline)))
      (delete-duplicates authors))))

;; (authors "v0.8.2..HEAD")
- adding a new target to "Makefile.am" (and to 'dist-hook' there).

Right?

However I see an issue with the autogenerated AUTHORS.  There will be
duplicates since people not always use a single name/e-mail.  For
example, there are:

Joshua S. Grant <address@hidden>
Joshua S. Grant <address@hidden>
Joshua Grant <address@hidden>
Guy Grant <address@hidden>

or even:

Ludovic Courtès <address@hidden>
Ludovic Courtès <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]