warning for persistence
This commit is contained in:
@@ -194,6 +194,18 @@ form?.addEventListener("submit", async (e) => {
|
|||||||
noPrinting,
|
noPrinting,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const hasAndroid = platforms.some(p => p.startsWith('android-'));
|
||||||
|
if (hasAndroid && enablePersistence) {
|
||||||
|
if (!confirm(
|
||||||
|
'⚠️ WARNING: Persistence is NOT supported on Android\n\n' +
|
||||||
|
'The persistence setting will be ignored for Android builds.\n' +
|
||||||
|
'Persistence is only supported on: Windows, Linux, and macOS\n\n' +
|
||||||
|
'Continue with build anyway?'
|
||||||
|
)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await startBuild(buildConfig);
|
await startBuild(buildConfig);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -269,9 +269,13 @@ export async function startBuildProcess(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (config.enablePersistence) {
|
if (config.enablePersistence) {
|
||||||
|
if (!platform.startsWith('android-')) {
|
||||||
const persistenceFlag = "-X overlord-client/cmd/agent/config.DefaultPersistence=true";
|
const persistenceFlag = "-X overlord-client/cmd/agent/config.DefaultPersistence=true";
|
||||||
ldflags = ldflags ? `${ldflags} ${persistenceFlag}` : persistenceFlag;
|
ldflags = ldflags ? `${ldflags} ${persistenceFlag}` : persistenceFlag;
|
||||||
sendToStream({ type: "output", text: `Persistence enabled for ${platform}\n`, level: "info" });
|
sendToStream({ type: "output", text: `Persistence enabled for ${platform}\n`, level: "info" });
|
||||||
|
} else {
|
||||||
|
sendToStream({ type: "output", text: `Persistence is not supported on ${platform}, skipping...\n`, level: "warning" });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildAgentToken) {
|
if (buildAgentToken) {
|
||||||
|
|||||||
Reference in New Issue
Block a user