summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2025-05-26 21:51:02 -0400
committerLeo Famulari <leo@famulari.name>2025-05-27 10:11:03 -0400
commit96da4def781a1b01536fd4335be0446984dc6705 (patch)
treeaec8bb94fdf55f9b808d02bb6b29a603f2c0f2a4
parentda81ce890cdc26da2ef19173d74cd84c0c3a6aa5 (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-xetc/git/pre-push36
1 files changed, 19 insertions, 17 deletions
diff --git a/etc/git/pre-push b/etc/git/pre-push
index c22dd064211..19c344d91ed 100755
--- a/etc/git/pre-push
+++ b/etc/git/pre-push
@@ -36,23 +36,25 @@ do
36 ;; 36 ;;
37 esac 37 esac
38 38
39 # Only use the hook when pushing to upstream. 39 # Only use the hook when pushing to upstream.
40 case "$2" in 40 case "$2" in
41 *.gnu.org*) 41 *.gnu.org*)
42 echo "adjust remote: repo was migrated to codeberg" 42 set -e
43 exit 127 43 guix git authenticate
44 ;; 44 exec make check-channel-news
45 *codeberg.org/guix/*) 45 exit 127
46 set -e 46 ;;
47 guix git authenticate 47 *codeberg.org/guix/*)
48 exec make check-channel-news 48 set -e
49 exit 127 49 guix git authenticate
50 ;; 50 exec make check-channel-news
51 *) 51 exit 127
52 exit 0 52 ;;
53 ;; 53 *)
54 esac 54 exit 0
55 fi 55 ;;
56 esac
57 fi
56done 58done
57 59
58exit 0 60exit 0