Skip to content

Commit

Permalink
Expand Rhel 7 downloads onto oracle and centos.
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangibanelbtactic committed Mar 31, 2024
1 parent c8d94e0 commit 57b85a1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/generate-downloads-page.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,27 @@ def filterByCategory(matrix, category):
newMatrix.append(nRow)
return (newMatrix)

def expandByRhel7(matrix):
rhel7Regex = re.compile('^.*-rhel-7$')
newMatrix = []
for nRow in matrix:
if re.match(rhel7Regex, nRow['prefixTag']):
rhelRow = nRow.copy()
rhelRow['distroLongName'] = "Red Hat Enterprise Linux 7"
newMatrix.append(rhelRow)

oracleRow = nRow.copy()
oracleRow['prefixTag'] = nRow['prefixTag'].replace("rhel","oracle")
oracleRow['distroLongName'] = "Oracle Linux 7"
newMatrix.append(oracleRow)

centosRow = nRow.copy()
centosRow['prefixTag'] = nRow['prefixTag'].replace("rhel","centos")
centosRow['distroLongName'] = "CentOS 7"
newMatrix.append(centosRow)
newMatrix.append(nRow)
return (newMatrix)

def expandByRhel8(matrix):
rhel8Regex = re.compile('^.*-rhel-8$')
newMatrix = []
Expand Down Expand Up @@ -223,6 +244,7 @@ def outputNewLine(downloads_md):
# Get the main releasesMatrix with all of the releases information
releasesMatrix = getReleasesMatrix()

releasesMatrix = expandByRhel7(releasesMatrix)
releasesMatrix = expandByRhel8(releasesMatrix)

# Get our four main matrices
Expand Down

0 comments on commit 57b85a1

Please sign in to comment.