autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

Re: Automatic set-serial?


From: Reuben Thomas
Subject: Re: Automatic set-serial?
Date: Fri, 24 Dec 2010 20:17:44 +0000

On 24 December 2010 11:50, Peter Simons <address@hidden> wrote:
> Hi Reuben,
>  > How about adding set-serial to the maintainer-all target, and then
>  > running a pre-receive hook on the master repository which runs the same
>  > code and checks that nothing changes as a result; if it does, it can
>  > raise an error telling the developer to make maintainer-all.
>
> Yes, that's definitely the best solution. I don't know how easy it is to get
> such a hook installed on the Savannah server, but I reckon that it would be
> possible.

OK, well the maintainer-all bit can be done anyway. Is there any need
to change macro.py, or can the line:

          $(top_srcdir)/set-serial.sh $(distdir)/m4/*.m4;

just be added to the $(STAGEDIR)/%.m4 target in cfg.mk?

To make the git hook work well, would it be worth putting the code
under the $(STAGEDIR)/%.m4 target in a separate file, which can also
be used for the git-receive hook? Then it's simply a question of
running exactly the same code in the git-receive hook.

As to how to write the git-receive hook, after a bit of searching I
found the following skeletal example here:

http://stackoverflow.com/questions/2539404/git-pre-receive-hook-to-lunch-php-codesniffer

#!/bin/bash

while read old_sha1 new_sha1 refname; do
    echo "ns: " $new_sha1;
    echo "os: " $old_sha1;

    echo "----"

    git ls-tree -r $new_sha1 | cut -f 3 -d ' ' | cut -f 1 | while read file; do
        git cat-file blob $file
    done;

    echo "----"

done

exit 1

I've submitted a support request on Savannah to ask how we set up the hook.

-- 
http://rrt.sc3d.org



reply via email to

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