fix i386
This commit is contained in:
parent
3b81e4db20
commit
7a4df6fa07
@ -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 = () => {
|
||||
<div className="flex-grow overflow-hidden">
|
||||
<div className="container mx-0 px-0 h-full">
|
||||
<div className="h-full">
|
||||
<Button onClick={buildAllPackages}>Build all</Button>
|
||||
<Table className="w-full">
|
||||
<TableHeader className="top-0 bg-background z-10 hidden md:table-header-group">
|
||||
<TableRow>
|
||||
|
Loading…
Reference in New Issue
Block a user