Loading misc/example.conf +6 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,12 @@ url = # Default is \.(?:tar(?:\.gz|\.bz2|\.xz)?|tgz|tbz2|zip) #regex_ext = # Exclude upstream versions matching this regex before looking for the last # Useful to remove release candiates and beta versions # Default is .*(rc|beta).* # Set to empty string to not exclude #regex_exclude = # Custom upstream version modifier in python # e.g: version.replace("-", "_") #eval_upstream = Loading src/lib/archversion/version.py +8 −1 Original line number Diff line number Diff line Loading @@ -102,9 +102,16 @@ class VersionController(object): if v is None or len(v) == 0: raise VersionNotFound("No regex match on upstream") # remove duplicity v = list(set(v)) v = set(v) # list all found versions logging.debug("Found versions: %s" % v) # exclude versions regex_exclude = value.get("regex_exclude", ".*(rc|beta).*") if regex_exclude != "": logging.debug("Exclusion regex: %s" % regex_exclude) v -= set(filter(lambda x: "rc" in x, v)) logging.debug("Found versions after exclusion: %s" % v) # latest version is the highest v = max(v, key=VersionKey) # list selected version logging.debug("Upstream version is : %s" % v) Loading Loading
misc/example.conf +6 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,12 @@ url = # Default is \.(?:tar(?:\.gz|\.bz2|\.xz)?|tgz|tbz2|zip) #regex_ext = # Exclude upstream versions matching this regex before looking for the last # Useful to remove release candiates and beta versions # Default is .*(rc|beta).* # Set to empty string to not exclude #regex_exclude = # Custom upstream version modifier in python # e.g: version.replace("-", "_") #eval_upstream = Loading
src/lib/archversion/version.py +8 −1 Original line number Diff line number Diff line Loading @@ -102,9 +102,16 @@ class VersionController(object): if v is None or len(v) == 0: raise VersionNotFound("No regex match on upstream") # remove duplicity v = list(set(v)) v = set(v) # list all found versions logging.debug("Found versions: %s" % v) # exclude versions regex_exclude = value.get("regex_exclude", ".*(rc|beta).*") if regex_exclude != "": logging.debug("Exclusion regex: %s" % regex_exclude) v -= set(filter(lambda x: "rc" in x, v)) logging.debug("Found versions after exclusion: %s" % v) # latest version is the highest v = max(v, key=VersionKey) # list selected version logging.debug("Upstream version is : %s" % v) Loading