From 7cc06b578612e4965add12181d76dadc81a9e873 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 1 Dec 2021 15:42:31 +0000 Subject: recipetool: handle GitLab URLs like we do GitHub GitHub URLs are automatically transformed to git: fetches, so handle GitLab URLs too. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (cherry picked from commit 651fb951819840fe122458ddbd852ee6c7ec0455) Signed-off-by: Anuj Mittal --- scripts/lib/recipetool/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 116bdfd697..5752db5c2e 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -366,7 +366,7 @@ def supports_srcrev(uri): def reformat_git_uri(uri): '''Convert any http[s]://....git URI into git://...;protocol=http[s]''' checkuri = uri.split(';', 1)[0] - if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://github.com/[^/]+/[^/]+/?$', checkuri): + if checkuri.endswith('.git') or '/git/' in checkuri or re.match('https?://git(hub|lab).com/[^/]+/[^/]+/?$', checkuri): # Appends scheme if the scheme is missing if not '://' in uri: uri = 'git://' + uri -- cgit 1.2.3-korg