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);
|
||||||
|
const packResp = await fetch("/api/package/" + pkg.Name, {
|
||||||
|
method: "GET",
|
||||||
|
});
|
||||||
|
|
||||||
|
const packData = await packResp.json();
|
||||||
|
const firstPackage = packData.Packages[Object.keys(packData.Packages)[0]];
|
||||||
|
if (packResp.ok) {
|
||||||
setRebuildData({
|
setRebuildData({
|
||||||
packageName: pkg.Name,
|
packageName: pkg.Name,
|
||||||
version: pkg.BuildVersion,
|
version: firstPackage.NewVersion || firstPackage.Version,
|
||||||
buildType: "lto",
|
buildType: "lto",
|
||||||
rebuild: false,
|
rebuild: false,
|
||||||
});
|
});
|
||||||
setIsDialogOpen(true);
|
setIsDialogOpen(true);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDialogSubmit = async () => {
|
const handleDialogSubmit = async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user