diff mbox series

[bug#47069] etc: Run pre-push make in guix environment.

Message ID 20210311144257.4203-1-me@tobias.gr
State New
Headers show
Series [bug#47069] etc: Run pre-push make in guix environment. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Tobias Geerinckx-Rice March 11, 2021, 2:42 p.m. UTC
* etc/git/pre-push: Exec make in a guix development environment.
---

Guix,

The pre-push assumes you have make installed, which I didn't.

Now it assumes that Guix developers have a vaguely up-to-date guix
command, which seems reasonable.

Kind regards,

T G-R

 etc/git/pre-push | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Tournier March 26, 2021, 8:20 a.m. UTC | #1
Hi Tobias,

On Thu, 11 Mar 2021 at 15:42, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
> * etc/git/pre-push: Exec make in a guix development environment.
> ---

> The pre-push assumes you have make installed, which I didn't.

How do you rebuild Guix before pushing?


Cheers,
simon
Leo Prikler March 26, 2021, 10:11 a.m. UTC | #2
Am Freitag, den 26.03.2021, 09:20 +0100 schrieb zimoun:
> Hi Tobias,
> 
> On Thu, 11 Mar 2021 at 15:42, Tobias Geerinckx-Rice <me@tobias.gr>
> wrote:
> > * etc/git/pre-push: Exec make in a guix development environment.
> > ---
> > The pre-push assumes you have make installed, which I didn't.
> 
> How do you rebuild Guix before pushing?
If that's a problem for the script, you could add an explicit 'all'
target.  

That said, I think, that many developers (myself included), who would
suffer from the problem mentioned by Tobias already run 'git push'
inside a guix environment.  I know I do.  
@Tobias: would it make sense to detect that case (via GUIX_ENVIRONMENT)
and only optionally construct the guix environment?

Regards,
Leo
diff mbox series

Patch

diff --git a/etc/git/pre-push b/etc/git/pre-push
index 59671b0d58..372c7dece0 100755
--- a/etc/git/pre-push
+++ b/etc/git/pre-push
@@ -32,7 +32,7 @@  do
 		# Only use the hook when pushing to Savannah.
 		case "$2" in
 		    *.gnu.org*)
-			exec make authenticate check-channel-news
+			exec guix environment guix -- make authenticate check-channel-news
 			exit 127
 			;;
 		    *)