Parses a distro version string and returns a modified string
that matches the format needed for the gitbuilder url.
- Minor version numbers are ignored if they end in a zero. If they do
- not end in a zero the minor version number is included with an
- underscore as the separator instead of a period.
+ Minor version numbers are ignored.
"""
- version_tokens = version.split(".")
- include_minor_version = (
- len(version_tokens) > 1 and
- version_tokens[1] != "0"
- )
- if include_minor_version:
- return "_".join(version_tokens)
-
- # return only the major version
- return version_tokens[0]
+ return version.split(".")[0]
def _get_distro(self, distro=None, version=None, codename=None):
"""
GITBUILDER_DISTRO_MATRIX = [
('rhel', '7.0', None, 'centos7'),
- ('centos', '6.5', None, 'centos6_5'),
+ ('centos', '6.5', None, 'centos6'),
+ ('centos', '7.0', None, 'centos7'),
+ ('centos', '7.1', None, 'centos7'),
('fedora', '20', None, 'fc20'),
('ubuntu', '14.04', 'trusty', 'trusty'),
('ubuntu', '14.04', None, 'trusty'),