aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-25 14:52:12 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-25 15:14:31 -0400
commit13a3b9c748a80c0d4c79450e479416480273d2f7 (patch)
tree51d433592e9975ae310173a4c73c857943153307 /build-aux
parent349666b7d233b551781d37eb1fed2c1125610097 (diff)
downloadguix-13a3b9c748a80c0d4c79450e479416480273d2f7.tar
guix-13a3b9c748a80c0d4c79450e479416480273d2f7.tar.gz
maint: update-guix-package: Include the git.sv.gnu.org alias.
* build-aux/update-guix-package.scm (%savannah-guix-git-repo-push-url): Rename to... (%savannah-guix-git-repo-push-url-regexp): ...this. Add the 'sv' alternative to 'savannah' and the (push) suffix in the URL regexp. (find-origin-remote): Adjust accordingly. Reported-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/update-guix-package.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/build-aux/update-guix-package.scm b/build-aux/update-guix-package.scm
index 9b03b06c7c..ff6b105468 100644
--- a/build-aux/update-guix-package.scm
+++ b/build-aux/update-guix-package.scm
@@ -35,6 +35,7 @@
(gnu packages package-management)
(ice-9 match)
(ice-9 popen)
+ (ice-9 regex)
(ice-9 textual-ports)
(srfi srfi-1)
(srfi srfi-2)
@@ -126,8 +127,8 @@ COMMIT."
(lambda ()
(invoke "git" "worktree" "remove" "--force" tmp-directory))))))
-(define %savannah-guix-git-repo-push-url
- "git.savannah.gnu.org/srv/git/guix.git")
+(define %savannah-guix-git-repo-push-url-regexp
+ "git.(savannah|sv).gnu.org/srv/git/guix.git \\(push\\)")
(define-syntax-rule (with-input-pipe-to-string prog arg ...)
(let* ((input-pipe (open-pipe* OPEN_READ prog arg ...))
@@ -143,10 +144,9 @@ COMMIT."
(and-let* ((remotes (string-split (with-input-pipe-to-string
"git" "remote" "-v")
#\newline))
- (origin-entry (find (cut string-contains <>
- (string-append
- %savannah-guix-git-repo-push-url
- " (push)"))
+ (origin-entry (find (cut string-match
+ %savannah-guix-git-repo-push-url-regexp
+ <>)
remotes)))
(first (string-split origin-entry #\tab))))