Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions bin/package_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,33 @@ def pds(q):
DATA.close()
print(f"Saved!\nfilename: {q}")

def zopencommunity():
url = "https://raw.githubusercontent.com/zopencommunity/meta/main/docs/api/zopen_releases_latest.json"
try:
req = requests.get(url)
data = req.json()
if req.status_code == 404:
raise Exception("404 File not found")
except Exception as e:
print("Couldn't pull. Error: ", str(e))
else:
zopen_list = []
for release in data['release_data']:
for asset in data['release_data'][release]:
package_info = {
"packageName": release,
"description": f"This is a zopen community port of {release}. Visit https://github.com/zopencommunity/{release}port for more details.",
"version": asset['assets'][0]['version']
}
zopen_list.append(package_info)

file_name = 'zopencommunity.json'
file_path = f'{DATA_FILE_LOCATION}/{file_name}'

with open(file_path, 'w') as file:
json.dump(zopen_list, file, indent=2)
print(f"Saved!\nfilename: {file_name}")

if __name__ == "__main__":

try:
Expand Down Expand Up @@ -380,6 +407,9 @@ def pds(q):
elif file == 'RockyLinux' or file == 'rockylinux':
print(f"Extracting {file} data ... ")
rockylinux()
elif file == 'ZopenCommunity' or file == 'zopencommunity':
print(f"Extracting data for {file} ... ")
zopencommunity()
elif file == 'IBM-Validated' or file == 'ibm-validated':
print(f"Extracting {file} data ... ")
getIBMValidatedOpenSourceList(oskey)
Expand All @@ -394,6 +424,7 @@ def pds(q):
"\n./package_build.py rockylinux\n\t\t\t[if data is from RockyLinux]"
"\n./package_build.py ibm-validated\n\t\t\t[if data is from IBM Validated Open Source List]"
"\n./package_build.py\n\t\t\t[for displaying this help]\n"
"\n./package_build.py zopencommunity\n\t\t\t[if data is from zopen community]"
"Example:\n./package_build.py RHEL_8_Package_List.json\n./package_build.py debian")

print("Thanks for using SDT!")
1 change: 1 addition & 0 deletions src/config/supported_distros.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SUPPORTED_DISTROS = {
'z/OS Rocket Software': 'ZOS_Rocket_Software',
'z/OS Open Mainframe Project': 'ZOS_OMP',
'z/OS from IBM-Z-zOS': 'IBM_Z_zOS'
'z/OS from zopen community': 'zopencommunity'
},
'IBM Z and LinuxONE Container Registry': {
'Container Images for IBM Z and LinuxONE': 'IBMZ_container_registry'
Expand Down