diff options
author | Leo Famulari <leo@famulari.name> | 2025-05-26 21:51:02 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2025-05-27 10:11:03 -0400 |
commit | 96da4def781a1b01536fd4335be0446984dc6705 (patch) | |
tree | aec8bb94fdf55f9b808d02bb6b29a603f2c0f2a4 | |
parent | da81ce890cdc26da2ef19173d74cd84c0c3a6aa5 (diff) |
etc: pre-push Git hook: Make portable to current Debian.
Closes #64
The ;& operator was introduced in POSIX.1-2024 "Issue 8", from 2024, but
is not yet available in Debian's dash shell.
* etc/git/pre-push: Duplicate the handling of our two canonical Git repo
URLs.
Change-Id: I1125810c9f2d6fb9a99f7220d971cc38387989d3
-rwxr-xr-x | etc/git/pre-push | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/etc/git/pre-push b/etc/git/pre-push index c22dd06421..19c344d91e 100755 --- a/etc/git/pre-push +++ b/etc/git/pre-push @@ -36,23 +36,25 @@ do ;; esac - # Only use the hook when pushing to upstream. - case "$2" in - *.gnu.org*) - echo "adjust remote: repo was migrated to codeberg" - exit 127 - ;; - *codeberg.org/guix/*) - set -e - guix git authenticate - exec make check-channel-news - exit 127 - ;; - *) - exit 0 - ;; - esac - fi + # Only use the hook when pushing to upstream. + case "$2" in + *.gnu.org*) + set -e + guix git authenticate + exec make check-channel-news + exit 127 + ;; + *codeberg.org/guix/*) + set -e + guix git authenticate + exec make check-channel-news + exit 127 + ;; + *) + exit 0 + ;; + esac + fi done exit 0 |