develooper Front page | perl.perl5.porters | Postings from January 2016

Re: git client hook to enforce a smoke test before commit

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
January 30, 2016 09:25
Subject:
Re: git client hook to enforce a smoke test before commit
Message ID:
20160130102432.57070c82@pc09.procura.nl
On Fri, 29 Jan 2016 17:16:53 -0500, Jarkko Hietaniemi <jhi@iki.fi>
wrote:

> I've been using this lately, saved me some oopsies, wrote them after 
> some embarrassing and rage-inducing incidents.  I'm not that well versed 
> in git, very probably enhancements and fixes can be made.
> 
> So what this does: before git push, a test build is launched, and only 
> if that passes, and one hits 'y' in the keyboard, it gets truly pushed. 
> There's special code for handling the "Greer smokes".
> 
> (1) The .git/hooks/pre-push is a symlink to the attached 
> perl5-git-pre-push.sh

/me just wonders why that is all written in shell code and not in
perl :)

> (2) That *.sh calls the attached perl-git-build which I have in my $PATH
> 
> (3) The perl-git-build opens $HOME/.perl-git-build.rc, sample below
> 
> In my setup my laptop is a little old and tired, but I have a relatively 
> beefy and underutilized desktop.  The perl-git-guild ssh:s into it, 
> prepares the source tree appropriately (see below) and does the build. 
> That is the remote_host in the .rc file, like this:
> 
> remote_host=SERVER.NAME.HERE
> remote_jobs=8
> remote_git_clone_dir=perl5-git/perl
> remote_configure_flags=
> 
> The perl-git-build can be used also explicitly to do quickie test 
> builds.  There are three 'modes': plain, patch, and snapshot.  The 
> 'plain' mode just does a git clone of blead HEAD (I guess the name 
> 'plain' is not the best possible).  The 'patch' does git format-patch 
> $origin_sha.. of the local head and in the build host applies those 
> patches.  The 'snapshot' does git archive of of the local head and 
> unpacks that in the remote host.
> 
> Enjoy responsibly.

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.23   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About