From 9bf812888492dfdc84e85c1f3551066620bb3e7e Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Sun, 10 Sep 2017 09:54:28 +0200 Subject: [PATCH] gitpkg: Support gitlab.gnome.org --- roles/archbuild/files/gitpkg | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/roles/archbuild/files/gitpkg b/roles/archbuild/files/gitpkg index 5f43d1bb9..48f324852 100755 --- a/roles/archbuild/files/gitpkg +++ b/roles/archbuild/files/gitpkg @@ -16,7 +16,7 @@ OptionParser.new do |opts| Otherwise, if a Git URI is provided, replaces the first source with the provided URI. - Submodules aren't yet handled. Remember to properly source and inject + Submodules are not yet handled. Remember to properly source and inject any submodules required. Options: @@ -156,9 +156,10 @@ end class Repo SRCDEST = "/var/lib/archbuilddest/srcdest" DISCOVER_URLS = [ - "https://anongit.freedesktop.org/git/", - "https://git.gnome.org/browse/", - "https://github.com/", + "https://anongit.freedesktop.org/git/%", + "https://gitlab.gnome.org/GNOME/%.git", + "https://git.gnome.org/browse/%", + "https://github.com/%", ] attr_reader :name, :url @@ -183,7 +184,7 @@ class Repo name, url = split_src src if url !~ /:\/\// - url = DISCOVER_URLS.map { |u| u + url }.find do |u| + url = DISCOVER_URLS.map { |u| u.sub(/%/, url) }.find do |u| puts "Trying #{u}" exists?(u) end -- GitLab