mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
feat(recomps): pin catalog releases so installs avoid the GitHub API limit
This commit is contained in:
1 parent
91b2f5483d
commit
40b2db8007
3 files changed
+266
-43
No files matched your search
@@ -11,15 +11,36 @@
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/Zelda64Recomp/Zelda64Recomp/dev/icons/512.png",
|
||||
"builds": {
|
||||
"linux-arm64": { "asset": "^Zelda64Recompiled-.*-Linux-ARM64\\.zip$", "entry": "Zelda64Recompiled" },
|
||||
"linux-x64": { "asset": "^Zelda64Recompiled-.*-Linux-X64\\.zip$", "entry": "Zelda64Recompiled" },
|
||||
"windows-x64": { "asset": "^Zelda64Recompiled-.*-Windows\\.zip$", "entry": "Zelda64Recompiled.exe" }
|
||||
"linux-arm64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Linux-ARM64\\.zip$",
|
||||
"entry": "Zelda64Recompiled",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Linux-ARM64.zip",
|
||||
"sha256": "2e49b96aced578363065e1764ca96eaa5590cb6f7e80efd10e8ce1a08462b933"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Linux-X64\\.zip$",
|
||||
"entry": "Zelda64Recompiled",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Linux-X64.zip",
|
||||
"sha256": "de8b19cdb4e3ad0c10fd6d8127f7a6cc2a9eba106d89c753439178b718887c42"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^Zelda64Recompiled-.*-Windows\\.zip$",
|
||||
"entry": "Zelda64Recompiled.exe",
|
||||
"file": "Zelda64Recompiled-v1.2.2-Windows.zip",
|
||||
"sha256": "d02b95f1cf5e4d44d6587fa6136c6db521f61aa41ba8700c05f91bea8b0a26d0"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Majora's Mask (USA) N64 ROM",
|
||||
"sha1": ["d6133ace5afaa0882cf214cf88daba39e266c078"],
|
||||
"sha1": [
|
||||
"d6133ace5afaa0882cf214cf88daba39e266c078"
|
||||
],
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.2.2",
|
||||
"published": "2025-08-27T00:58:35Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,14 +53,33 @@
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/sonicdcer/Starfox64Recomp/main/icons/512.png",
|
||||
"builds": {
|
||||
"linux-arm64": { "asset": "^Starfox64Recompiled-.*-Linux-ARM64-Release\\.zip$", "entry": "Starfox64Recompiled" },
|
||||
"linux-x64": { "asset": "^Starfox64Recompiled-.*-Linux-X64-Release\\.zip$", "entry": "Starfox64Recompiled" },
|
||||
"windows-x64": { "asset": "^Starfox64Recompiled-.*-Windows-.*\\.zip$", "entry": "Starfox64Recompiled.exe" }
|
||||
"linux-arm64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Linux-ARM64-Release\\.zip$",
|
||||
"entry": "Starfox64Recompiled",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Linux-ARM64-Release.zip",
|
||||
"sha256": "85408daa5ceac1fc208a744b0a35fb316c417d62c709761aceb242353fb2a1c0"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Linux-X64-Release\\.zip$",
|
||||
"entry": "Starfox64Recompiled",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Linux-X64-Release.zip",
|
||||
"sha256": "e74932bd0edb6186a015dabaa87b6b24af3d3b5511ff3b0293a2c3331840cdf0"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^Starfox64Recompiled-.*-Windows-.*\\.zip$",
|
||||
"entry": "Starfox64Recompiled.exe",
|
||||
"file": "Starfox64Recompiled-v1.0.3-Windows-RelWithDebInfo.zip",
|
||||
"sha256": "768c18b0aeb325a0102f722338f09a270a76eeebea29154764147a93d0bde530"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Star Fox 64 (USA) N64 ROM",
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "1.0.3",
|
||||
"published": "2025-12-30T04:13:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -52,14 +92,33 @@
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://raw.githubusercontent.com/BanjoRecomp/BanjoRecomp/main/icons/app.png",
|
||||
"builds": {
|
||||
"linux-arm64": { "asset": "^BanjoRecompiled-.*-Linux-ARM64\\.tar\\.gz$", "entry": "BanjoRecompiled" },
|
||||
"linux-x64": { "asset": "^BanjoRecompiled-.*-Linux-X64\\.tar\\.gz$", "entry": "BanjoRecompiled" },
|
||||
"windows-x64": { "asset": "^BanjoRecompiled-.*-Windows\\.zip$", "entry": "BanjoRecompiled.exe" }
|
||||
"linux-arm64": {
|
||||
"asset": "^BanjoRecompiled-.*-Linux-ARM64\\.tar\\.gz$",
|
||||
"entry": "BanjoRecompiled",
|
||||
"file": "BanjoRecompiled-v1.0.2-Linux-ARM64.tar.gz",
|
||||
"sha256": "53515be8bc453bc32ed8cbc72e3cd06350ab4a28bd94b0aa6499d4b963a83757"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^BanjoRecompiled-.*-Linux-X64\\.tar\\.gz$",
|
||||
"entry": "BanjoRecompiled",
|
||||
"file": "BanjoRecompiled-v1.0.2-Linux-X64.tar.gz",
|
||||
"sha256": "a34a4d361221171ea638e0165301fff817c53b9cd46167c5affd37867cfc7ad0"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^BanjoRecompiled-.*-Windows\\.zip$",
|
||||
"entry": "BanjoRecompiled.exe",
|
||||
"file": "BanjoRecompiled-v1.0.2-Windows.zip",
|
||||
"sha256": "fc34aad48e06681878bedd13b88d5332a2f21f6a98cafc931c94d54892a4dd92"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Banjo-Kazooie (USA) N64 ROM",
|
||||
"note": "Choose the ROM from the recomp's own start screen."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.0.2",
|
||||
"published": "2026-07-31T19:43:17Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -72,14 +131,30 @@
|
||||
"license": "CC0-1.0",
|
||||
"art": "https://raw.githubusercontent.com/2ship2harkinian/2ship2harkinian/develop/mm/linux/2s2hIcon.png",
|
||||
"builds": {
|
||||
"linux-x64": { "asset": "^2Ship-.*-Linux\\.zip$", "entry": "2ship.appimage" },
|
||||
"windows-x64": { "asset": "^2Ship-.*-Win64\\.zip$", "entry": "2ship.exe" }
|
||||
"linux-x64": {
|
||||
"asset": "^2Ship-.*-Linux\\.zip$",
|
||||
"entry": "2ship.appimage",
|
||||
"file": "2Ship-Battler-Bravo-Linux.zip",
|
||||
"sha256": "6cdd4fe06f3f9b095e99c86fef70b9265cc921fb6faa7ba1e18e94e90ed0b345"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^2Ship-.*-Win64\\.zip$",
|
||||
"entry": "2ship.exe",
|
||||
"file": "2Ship-Battler-Bravo-Win64.zip",
|
||||
"sha256": "a46664a01623ad5d7cc82d29a9889699f6a98c9501c7a959a089f34380c1f078"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "rom",
|
||||
"label": "Majora's Mask (USA) N64 ROM",
|
||||
"sha1": ["d6133ace5afaa0882cf214cf88daba39e266c078"],
|
||||
"sha1": [
|
||||
"d6133ace5afaa0882cf214cf88daba39e266c078"
|
||||
],
|
||||
"note": "The port asks for the ROM on first start and builds its asset archive from it."
|
||||
},
|
||||
"release": {
|
||||
"tag": "5.0.1",
|
||||
"published": "2026-08-25T17:54:43Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -91,12 +166,20 @@
|
||||
"repo": "hedge-dev/UnleashedRecomp",
|
||||
"license": "GPL-3.0",
|
||||
"builds": {
|
||||
"windows-x64": { "asset": "^UnleashedRecomp-Windows\\.zip$", "entry": "UnleashedRecomp.exe" }
|
||||
"windows-x64": {
|
||||
"asset": "^UnleashedRecomp-Windows\\.zip$",
|
||||
"entry": "UnleashedRecomp.exe",
|
||||
"file": "UnleashedRecomp-Windows.zip"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "dump",
|
||||
"label": "Sonic Unleashed Xbox 360 game files and title update",
|
||||
"note": "The installer inside the recomp asks for your dumped game, update and DLC folders."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.0.3",
|
||||
"published": "2025-04-03T22:04:45Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -109,16 +192,52 @@
|
||||
"license": "Sustainable Use License",
|
||||
"art": "https://raw.githubusercontent.com/diasurgical/DevilutionX/master/Packaging/resources/icon.png",
|
||||
"builds": {
|
||||
"linux-arm64": { "asset": "^devilutionx-linux-aarch64\\.tar\\.xz$", "entry": "devilutionx", "args": ["--data-dir", "{data}"] },
|
||||
"linux-x64": { "asset": "^devilutionx-linux-x86_64\\.tar\\.xz$", "entry": "devilutionx", "args": ["--data-dir", "{data}"] },
|
||||
"windows-x64": { "asset": "^devilutionx-windows-x86_64\\.zip$", "entry": "devilutionx.exe" },
|
||||
"android": { "asset": "^devilutionx-android\\.apk$" }
|
||||
"linux-arm64": {
|
||||
"asset": "^devilutionx-linux-aarch64\\.tar\\.xz$",
|
||||
"entry": "devilutionx",
|
||||
"args": [
|
||||
"--data-dir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "devilutionx-linux-aarch64.tar.xz",
|
||||
"sha256": "71f34342cd750dc6dec1effefa250e90a5fe0f127e79d4c9c66f4d07706c3442"
|
||||
},
|
||||
"linux-x64": {
|
||||
"asset": "^devilutionx-linux-x86_64\\.tar\\.xz$",
|
||||
"entry": "devilutionx",
|
||||
"args": [
|
||||
"--data-dir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "devilutionx-linux-x86_64.tar.xz",
|
||||
"sha256": "3c0a79afad682054c4d11a91728887617b9f5dfbd8b6810dbb9226c380474432"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^devilutionx-windows-x86_64\\.zip$",
|
||||
"entry": "devilutionx.exe",
|
||||
"file": "devilutionx-windows-x86_64.zip",
|
||||
"sha256": "a20cfb62cd611f76aac78f9bf09a28f57794fbfe63ae6da9245deca446680b2b"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^devilutionx-android\\.apk$",
|
||||
"file": "devilutionx-android.apk",
|
||||
"sha256": "c5a53ff35223e367eba75ef8ed2caa31ea8e78792d8aff00f2cee51a0566b28f"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Diablo (GOG)",
|
||||
"stores": [{ "store": "gog", "id": "1412601690" }],
|
||||
"stores": [
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1412601690"
|
||||
}
|
||||
],
|
||||
"probe": "DIABDAT.MPQ"
|
||||
},
|
||||
"release": {
|
||||
"tag": "1.5.5",
|
||||
"published": "2025-10-30T17:00:17Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -131,14 +250,41 @@
|
||||
"license": "GPL-2.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/2310/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": { "asset": "^ironwail-.*-linux-x64\\.tar\\.gz$", "entry": "ironwail", "args": ["-basedir", "{data}"] },
|
||||
"windows-x64": { "asset": "^ironwail-.*-win64\\.zip$", "entry": "ironwail.exe" }
|
||||
"linux-x64": {
|
||||
"asset": "^ironwail-.*-linux-x64\\.tar\\.gz$",
|
||||
"entry": "ironwail",
|
||||
"args": [
|
||||
"-basedir",
|
||||
"{data}"
|
||||
],
|
||||
"file": "ironwail-0.8.2-linux-x64.tar.gz",
|
||||
"sha256": "fcb0219d13c50f64728892f0558b4761ba5578319a6cc01021fad981c6333aa5"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^ironwail-.*-win64\\.zip$",
|
||||
"entry": "ironwail.exe",
|
||||
"file": "ironwail-0.8.2-win64.zip",
|
||||
"sha256": "0e54e9089ce72bad73c288148cfb5474a00b05d9e1da1c8feb0b76665faf7d01"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Quake (Steam or GOG)",
|
||||
"stores": [{ "store": "steam", "id": "2310" }, { "store": "gog", "id": "1440166133" }],
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "2310"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440166133"
|
||||
}
|
||||
],
|
||||
"probe": "id1/pak0.pak"
|
||||
},
|
||||
"release": {
|
||||
"tag": "v0.8.2",
|
||||
"published": "2026-08-11T17:20:22Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -151,16 +297,42 @@
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/285330/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": { "asset": "^OpenRCT2-.*-linux-x86_64\\.AppImage$" },
|
||||
"windows-x64": { "asset": "^OpenRCT2-.*-windows-portable-x64\\.zip$", "entry": "openrct2.exe" },
|
||||
"android": { "asset": "^OpenRCT2-.*-android\\.apk$" }
|
||||
"linux-x64": {
|
||||
"asset": "^OpenRCT2-.*-linux-x86_64\\.AppImage$",
|
||||
"file": "OpenRCT2-v0.5.7-linux-x86_64.AppImage",
|
||||
"sha256": "d02ecb52d946d1e5f00db53a164fadbd41bbb8636f6f5cdddb44d954a3bcdb64"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^OpenRCT2-.*-windows-portable-x64\\.zip$",
|
||||
"entry": "openrct2.exe",
|
||||
"file": "OpenRCT2-v0.5.7-windows-portable-x64.zip",
|
||||
"sha256": "c8759848d0035a5de41985c5c6b8adb69aa197731f28a6f7e7441830912b0300"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^OpenRCT2-.*-android\\.apk$",
|
||||
"file": "OpenRCT2-v0.5.7-android.apk",
|
||||
"sha256": "3cc3b3078a120ae5a65b259c21bc989765a7008883f3298604976c607032cb0d"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "RollerCoaster Tycoon 2 (Steam or GOG)",
|
||||
"stores": [{ "store": "steam", "id": "285330" }, { "store": "gog", "id": "1207658957" }],
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "285330"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1207658957"
|
||||
}
|
||||
],
|
||||
"probe": "Data/g1.dat",
|
||||
"note": "OpenRCT2 asks for this folder on first start."
|
||||
},
|
||||
"release": {
|
||||
"tag": "v0.5.7",
|
||||
"published": "2026-11-01T10:57:49Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -173,15 +345,40 @@
|
||||
"license": "Sustainable Use License",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/38410/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": { "asset": "^fallout2-ce-linux-x64\\.tar\\.gz$", "entry": "fallout2-ce", "workdir": "data" },
|
||||
"windows-x64": { "asset": "^fallout2-ce-windows-x64\\.zip$", "entry": "fallout2-ce.exe" },
|
||||
"android": { "asset": "^fallout2-ce-android\\.apk$" }
|
||||
"linux-x64": {
|
||||
"asset": "^fallout2-ce-linux-x64\\.tar\\.gz$",
|
||||
"entry": "fallout2-ce",
|
||||
"workdir": "data",
|
||||
"file": "fallout2-ce-linux-x64.tar.gz"
|
||||
},
|
||||
"windows-x64": {
|
||||
"asset": "^fallout2-ce-windows-x64\\.zip$",
|
||||
"entry": "fallout2-ce.exe",
|
||||
"file": "fallout2-ce-windows-x64.zip"
|
||||
},
|
||||
"android": {
|
||||
"asset": "^fallout2-ce-android\\.apk$",
|
||||
"file": "fallout2-ce-android.apk"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Fallout 2 (Steam or GOG)",
|
||||
"stores": [{ "store": "steam", "id": "38410" }, { "store": "gog", "id": "1440166436" }],
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "38410"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440166436"
|
||||
}
|
||||
],
|
||||
"probe": "master.dat"
|
||||
},
|
||||
"release": {
|
||||
"tag": "v1.3.0",
|
||||
"published": "2024-04-21T10:16:02Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -194,14 +391,32 @@
|
||||
"license": "GPL-3.0",
|
||||
"art": "https://shared.steamstatic.com/store_item_assets/steam/apps/22320/library_600x900.jpg",
|
||||
"builds": {
|
||||
"linux-x64": { "asset": "^openmw-[0-9.]+-Linux-64Bit\\.tar\\.gz$", "entry": "openmw-launcher" }
|
||||
"linux-x64": {
|
||||
"asset": "^openmw-[0-9.]+-Linux-64Bit\\.tar\\.gz$",
|
||||
"entry": "openmw-launcher",
|
||||
"file": "openmw-0.51.0-Linux-64Bit.tar.gz",
|
||||
"sha256": "a39459e6adad06163eb0ffd4d80229e13aec8748211c3dfd5bf95c204ae68f0b"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"kind": "store",
|
||||
"label": "Morrowind GOTY (Steam or GOG)",
|
||||
"stores": [{ "store": "steam", "id": "22320" }, { "store": "gog", "id": "1440163901" }],
|
||||
"stores": [
|
||||
{
|
||||
"store": "steam",
|
||||
"id": "22320"
|
||||
},
|
||||
{
|
||||
"store": "gog",
|
||||
"id": "1440163901"
|
||||
}
|
||||
],
|
||||
"probe": "Data Files/Morrowind.esm",
|
||||
"note": "The OpenMW launcher's install wizard asks for the Morrowind folder."
|
||||
},
|
||||
"release": {
|
||||
"tag": "openmw-0.51.0",
|
||||
"published": "2026-06-19T19:58:46Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -135,11 +135,16 @@ from 820 dp and one below. Controller focus enters on the first card's primary b
|
||||
- Zelda 64: Recompiled v1.2.2, linux-arm64, on the Retroid Pocket Duo: Install from the card,
|
||||
Play, and it reached its own Select ROM screen natively. The top screen shows the page; the
|
||||
bottom screen's rail is labelled Recomps.
|
||||
- Pocket FIT Elite (portrait 1080×1920): the More tile and the single-column page. Installing an
|
||||
x86-64 build (Ironwail) failed there before pinning, because the releases API answered 403
|
||||
(rate limit). That failure led to the pinned downloads.
|
||||
- Unit tests: `RecompsTest`, which runs the wrapper under `/bin/sh` and covers release picking,
|
||||
data probing and resolution and catalog validation, and `NavTabsTest`.
|
||||
- Ironwail v0.8.2 (Quake), linux-x64, on the Duo through FEX: pinned install in about 5 s, then
|
||||
launch. With no Quake install linked, it asks for `-basedir`, which is the argument the
|
||||
wrapper passes once Steam or GOG Quake is found.
|
||||
- Pocket FIT Elite (portrait 1080×1920): the More tile and the single-column page. The first
|
||||
install attempt there got 403 from the releases API (rate limit), which led to the pinned
|
||||
downloads. After pinning, the install worked. Launching then stopped with exit 126: FEX needs
|
||||
the Steam Linux Runtime (sniper), and that device had never opened Steam. This applies to
|
||||
every x86 Linux app in DroidDeck; the card should say so (see below).
|
||||
- Unit tests: `RecompsTest`, which runs the wrapper under `/bin/sh` and covers release picking
|
||||
and pinning, data probing and resolution, and catalog validation, and `NavTabsTest`.
|
||||
|
||||
## Not done yet
|
||||
|
||||
@@ -155,6 +160,8 @@ from 820 dp and one below. Controller focus enters on the first card's primary b
|
||||
- **Linking your own folder.** For data copied from a PC: a folder picker that sets `recomp-data`
|
||||
by hand.
|
||||
- **ROM checks.** Hash a chosen ROM against `sha1` and say whether it is the right one.
|
||||
- **x86 runtime hint.** A linux-x64 build needs Steam opened once so the FEX runtime (sniper) is
|
||||
installed. Show that on the card, or fall back to the Windows build.
|
||||
- **Steam ownership** relies on the Steam page's library or the Steam store sign-in. A game
|
||||
installed by the Steam client counts as Found regardless.
|
||||
- **Recomp setup steps.** Some recomps build themselves from the player's data with bundled
|
||||
|
||||
@@ -18,12 +18,13 @@ DEFAULT = os.path.join(os.path.dirname(__file__), "..", "..", "app", "src", "mai
|
||||
def releases(repo):
|
||||
token = os.environ.get("GITHUB_TOKEN")
|
||||
url = f"https://api.github.com/repos/{repo}/releases?per_page=15"
|
||||
if token:
|
||||
req = urllib.request.Request(url, headers={"Authorization": f"Bearer {token}", "Accept": "application/vnd.github+json"})
|
||||
with urllib.request.urlopen(req, timeout=30) as r:
|
||||
return json.load(r)
|
||||
out = subprocess.run(["gh", "api", url.removeprefix("https://api.github.com/")], capture_output=True, text=True, check=True)
|
||||
return json.loads(out.stdout)
|
||||
if not token:
|
||||
out = subprocess.run(["gh", "api", url.removeprefix("https://api.github.com/")], capture_output=True, text=True)
|
||||
if out.returncode == 0:
|
||||
return json.loads(out.stdout)
|
||||
headers = {"Accept": "application/vnd.github+json"} | ({"Authorization": f"Bearer {token}"} if token else {})
|
||||
with urllib.request.urlopen(urllib.request.Request(url, headers=headers), timeout=30) as r:
|
||||
return json.load(r)
|
||||
|
||||
|
||||
def pick(rels, pattern, prerelease):
|
||||
|
||||
Reference in new issue
Block a user