me
/
guix
Archived
1
0
Fork 0

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>
Maxim Cournoyer 2020-10-25 14:52:12 -04:00
parent 349666b7d2
commit 13a3b9c748
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 6 additions and 6 deletions

View File

@ -35,6 +35,7 @@
(gnu packages package-management) (gnu packages package-management)
(ice-9 match) (ice-9 match)
(ice-9 popen) (ice-9 popen)
(ice-9 regex)
(ice-9 textual-ports) (ice-9 textual-ports)
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-2) (srfi srfi-2)
@ -126,8 +127,8 @@ COMMIT."
(lambda () (lambda ()
(invoke "git" "worktree" "remove" "--force" tmp-directory)))))) (invoke "git" "worktree" "remove" "--force" tmp-directory))))))
(define %savannah-guix-git-repo-push-url (define %savannah-guix-git-repo-push-url-regexp
"git.savannah.gnu.org/srv/git/guix.git") "git.(savannah|sv).gnu.org/srv/git/guix.git \\(push\\)")
(define-syntax-rule (with-input-pipe-to-string prog arg ...) (define-syntax-rule (with-input-pipe-to-string prog arg ...)
(let* ((input-pipe (open-pipe* OPEN_READ 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 (and-let* ((remotes (string-split (with-input-pipe-to-string
"git" "remote" "-v") "git" "remote" "-v")
#\newline)) #\newline))
(origin-entry (find (cut string-contains <> (origin-entry (find (cut string-match
(string-append %savannah-guix-git-repo-push-url-regexp
%savannah-guix-git-repo-push-url <>)
" (push)"))
remotes))) remotes)))
(first (string-split origin-entry #\tab)))) (first (string-split origin-entry #\tab))))