Package the json manifest too

This commit is contained in:
Davide Cavalca 2023-07-20 08:31:18 -07:00
parent cdf0a1f24a
commit 340844f960
3 changed files with 43 additions and 35 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ fedora.icns
installer_data.json
merged_installer_data.json
fedora-*.zip
fedora-*.raw.zst
fedora-*.json

View File

@ -149,10 +149,12 @@ def packageUpload(target):
package = f"{base}.zip"
logs_package = f"{base}-logs.zip"
image = f"{base}.raw.zstd"
manifest = f"{base}.json"
uploadToS3(package, f"os/{package}")
uploadToS3(logs_package, f"os/{logs_package}")
uploadToS3(image, f"os/{image}")
uploadToS3(manifest, f"os/{manifest}")
def getManifest():

View File

@ -65,44 +65,48 @@ pushd "${workdir}/package" > /dev/null
7z a -tzip -r "${basedir}/${package}" .
popd > /dev/null
cat > "${package}.json" <<EOF
{
"name": "Fedora Linux ${pretty_release}",
"default_os_name": "Fedora Linux ${pretty_release}",
"boot_object": "m1n1.bin",
"next_object": "m1n1/boot.bin",
"package": "${package}.zip",
"icon": "fedora.icns",
"supported_fw": ["12.3", "12.3.1", "12.4"],
"partitions": [
{
"name": "EFI",
"type": "EFI",
"size": "${esp_size}B",
"format": "fat",
"volume_id": "${esp_volume_id}",
"copy_firmware": true,
"copy_installer_data": true,
"source": "esp"
},
{
"name": "Boot",
"type": "Linux",
"size": "${boot_size}B",
"image": "boot.img"
},
{
"name": "Root",
"type": "Linux",
"size": "${root_size}B",
"expand": true,
"image": "root.img"
}
]
}
EOF
cat > installer_data.json <<EOF
{
"os_list": [
{
"name": "Fedora Linux ${pretty_release}",
"default_os_name": "Fedora Linux ${pretty_release}",
"boot_object": "m1n1.bin",
"next_object": "m1n1/boot.bin",
"package": "${package}.zip",
"icon": "fedora.icns",
"supported_fw": ["12.3", "12.3.1", "12.4"],
"partitions": [
{
"name": "EFI",
"type": "EFI",
"size": "${esp_size}B",
"format": "fat",
"volume_id": "${esp_volume_id}",
"copy_firmware": true,
"copy_installer_data": true,
"source": "esp"
},
{
"name": "Boot",
"type": "Linux",
"size": "${boot_size}B",
"image": "boot.img"
},
{
"name": "Root",
"type": "Linux",
"size": "${root_size}B",
"expand": true,
"image": "root.img"
}
]
}
]
$(cat "${package}.json")
]
}
EOF