diff --git a/src/components/pages/i386.tsx b/src/components/pages/i386.tsx index 5000647..8f07181 100644 --- a/src/components/pages/i386.tsx +++ b/src/components/pages/i386.tsx @@ -82,6 +82,43 @@ const I386: React.FC = () => { } }; + const buildAllPackages = async () => { + for (const packag of i386Packages) { + const pkg = { + packageName: packag.Name, + version: "", + buildType: "i386", + rebuild: false, + } + try { + if (!pkg.version) { + const packResp = await fetch("/api/package/" + pkg.packageName, { + method: "GET", + }); + const packData = await packResp.json(); + const firstPackage = packData.Packages[Object.keys(packData.Packages)[0]]; + pkg.version = firstPackage.NewVersion || firstPackage.Version; + } + + const response = await fetch("/api/admin/triggerbuild", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(pkg), + }); + + await response.json(); + + if (response.ok) { + continue; + } + } catch (error) { + alert("An error occurred while submitting the build request."); + } + } + }; + const handleDialogSubmit = async () => { try { const response = await fetch("/api/admin/triggerbuild", { @@ -110,6 +147,7 @@ const I386: React.FC = () => {
+