DavinciCodeOS / Cathedra

Simple build environment for compiling DavinciCodeOS
14 stars 1 forks source link

OTA v2 #7

Open Gelbpunkt opened 2 years ago

Gelbpunkt commented 2 years ago
Diniboy1123 commented 2 years ago

maybe consider:

Gelbpunkt commented 2 years ago

My current idea for OTA format would be having a single JSON file per device (yes, since maaaybe we can support other devices with the same SOC by Xiaomi), it would look like this, with new releases being added at the top:

{
    "device": "davinci",
    "device_full": "Mi 9T/Redmi K20",
    "maintainers": [
        {
            "main": true,
            "github": "Diniboy1123",
            "name": "Mary Johanna"
        },
        {
            "main": true,
            "github": "Gelbpunkt",
            "name": "Jens Reidel"
        },
        {
            "main": false,
            "github": "SomeDude",
            "name": "Some Developer"
        }
    ],
    "website": "https://github.com/DavinciCodeOS",
    "news": "https://t.me/DavinciCodeOS_Support",
    "releases": [
        {
            "version": "12.2",
            "type": "alpha",
            "needs_clean": true,
            "timestamp": 1649101502,
            "filename": "DavinciCodeOS_davinci-12.2-20220404-2147-OFFICIAL.zip",
            "size": 9999999,
            "download": "SOME_URL_YOU_KNOW",
            "sha256": "SOME_HASH_YOU_KNOW"
        },
        {
            "version": "12.1",
            "type": "beta",
            "needs_clean": false,
            "timestamp": 1649101501,
            "filename": "DavinciCodeOS_davinci-12.1-20220404-2146-OFFICIAL.zip",
            "size": 9999999,
            "download": "SOME_URL_YOU_KNOW",
            "sha256": "SOME_HASH_YOU_KNOW"
        },
        {
            "version": "12.1",
            "type": "stable",
            "needs_clean": false,
            "timestamp": 1649101500,
            "filename": "DavinciCodeOS_davinci-12.1-20220404-2145-OFFICIAL.zip",
            "size": 1824286089,
            "download": "https://github.com/DavinciCodeOS/Cathedra/releases/download/vergion/DavinciCodeOS_davinci-12.1-20220404-2145-OFFICIAL.zip",
            "sha256": "eb48a64ba6d12235db655e01883cacb791eceac31f2299e4f016e19678ce41bf"
        }
    ]
}

TODO: Changelog inline or as a link? TODO: Mirror support won't work with direct URLs, unless we make mirrors point to other davinci.json files? Thoughts?

Diniboy1123 commented 2 years ago

I would use a link for the sha256 so it would be pulled and extracted from a file. Otherwise I like the proposal.

Changelog as link please.

I thought about mirror support with custom jsons hosted by 3rd parties too. The link could be specified in the updater.

Gelbpunkt commented 2 years ago

I'd say changelog as a link is good, yes. Means one file per release, but that's okay. We could use https://github.com/noties/Markwon to render markdown changelogs in the app.