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]);
|
||||
|
||||
const handleRebuildClick = (pkg: any) => {
|
||||
const handleRebuildClick = async (pkg: any) => {
|
||||
setSelectedPackage(pkg);
|
||||
setRebuildData({
|
||||
packageName: pkg.Name,
|
||||
version: pkg.BuildVersion,
|
||||
buildType: "lto",
|
||||
rebuild: false,
|
||||
const packResp = await fetch("/api/package/" + pkg.Name, {
|
||||
method: "GET",
|
||||
});
|
||||
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 () => {
|
||||
|
Loading…
Reference in New Issue
Block a user