From 4aaaa6b38fe67bb452e86d18d66dcbb3de231a58 Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Jul 25 2021 23:19:14 +0000 Subject: Sync goname regex --- diff --git a/go2rpm/__init__.py b/go2rpm/__init__.py index 8e05114..2b4fc86 100644 --- a/go2rpm/__init__.py +++ b/go2rpm/__init__.py @@ -1,3 +1,3 @@ from rust2rpm import licensing -__version__ = "1.4.3" +__version__ = "1.5.0" diff --git a/go2rpm/__main__.py b/go2rpm/__main__.py index e039ec2..81daa22 100644 --- a/go2rpm/__main__.py +++ b/go2rpm/__main__.py @@ -94,9 +94,9 @@ def rpmname(goipath): # lowercase and end with '/' goname = goipath.lower() + "/" # remove eventual protocol prefix - goname = re.sub(r"^http(s?)://", r"", goname) + goname = re.sub(r"^http(s?):\/\/", r"", goname) # remove eventual .git suffix - goname = re.sub(r"\.git/*", r"", goname) + goname = re.sub(r"\.git\/", r"", goname) # remove eventual git. prefix goname = re.sub(r"^git\.", r"", goname) # remove FQDN root (.com, .org, etc) diff --git a/setup.py b/setup.py index e837602..caccb15 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ def read_version(path): with open(path, "rt") as f: for line in f: if line.startswith("__version__"): - return line.split("'")[1] + return line.split("\"")[1] raise IOError