Make the rebuild for errored src packages use the latest package version by default
This commit is contained in:
parent
5f263e7e1e
commit
073f9df8c8
@ -65,15 +65,23 @@ const Errored: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}, [loadPackages]);
|
}, [loadPackages]);
|
||||||
|
|
||||||
const handleRebuildClick = (pkg: any) => {
|
const handleRebuildClick = async (pkg: any) => {
|
||||||
setSelectedPackage(pkg);
|
setSelectedPackage(pkg);
|
||||||
setRebuildData({
|
const packResp = await fetch("/api/package/" + pkg.Name, {
|
||||||
packageName: pkg.Name,
|
method: "GET",
|
||||||
version: pkg.BuildVersion,
|
|
||||||
buildType: "lto",
|
|
||||||
rebuild: false,
|
|
||||||
});
|
});
|
||||||
setIsDialogOpen(true);
|
|
||||||
|
const packData = await packResp.json();
|
||||||
|
const firstPackage = packData.Packages[Object.keys(packData.Packages)[0]];
|
||||||
|
if (packResp.ok) {
|
||||||
|
setRebuildData({
|
||||||
|
packageName: pkg.Name,
|
||||||
|
version: firstPackage.NewVersion || firstPackage.Version,
|
||||||
|
buildType: "lto",
|
||||||
|
rebuild: false,
|
||||||
|
});
|
||||||
|
setIsDialogOpen(true);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDialogSubmit = async () => {
|
const handleDialogSubmit = async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user