Commit e75c9681 authored by Matthew Waters's avatar Matthew Waters 🐨
Browse files

enums: generate fedora version strings automatically

Like what is done for iOS now

Part-of: <!654>
parent cc89e5a7
Pipeline #219900 passed with stages
in 74 minutes and 13 seconds
......@@ -114,6 +114,7 @@ class DistroVersion:
FEDORA_30 = 'fedora_30'
FEDORA_31 = 'fedora_31'
FEDORA_32 = 'fedora_32'
# further fedora versions are generated automatically
REDHAT_6 = 'redhat_6'
REDHAT_7 = 'redhat_7'
REDHAT_8 = 'redhat_8'
......
......@@ -299,6 +299,10 @@ Terminating.''', file=sys.stderr)
distro_version = DistroVersion.FEDORA_31
elif d[1] == '32':
distro_version = DistroVersion.FEDORA_32
elif d[0] == 'Fedora':
# str(int()) is for ensuring that the fedora version is
# actually a number
distro_version = 'fedora_' + str(int(d[1]))
elif d[1].startswith('6.'):
distro_version = DistroVersion.REDHAT_6
elif d[1].startswith('7.'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment