Build the current workspace snapshot on native CI runners
This branch snapshots the in-progress desktop workspace so GitHub-hosted Windows and Linux runners can package the same source tree that already passes local verification on macOS. Constraint: Local Apple Silicon Docker/Wine packaging crashes before Windows artifacts are produced Rejected: Publish from the incomplete base repo state | remote typecheck failed because current source additions were missing Confidence: medium Scope-risk: broad Directive: Treat this branch as a build snapshot only; do not merge it without reviewing the unrelated workspace changes it contains Tested: local typecheck, lint, workspace typecheck, unit tests, integration tests, e2e smoke, macOS signed release upload Not-tested: Native Windows/Linux artifacts before this CI run
This commit is contained in:
1 parent
0e497cd892
commit
b772e1c758
271 files changed
+35047
-22879
No files matched your search
+36
-2
@@ -1,12 +1,46 @@
|
||||
import { createRequire } from "node:module";
|
||||
import { resolve } from "node:path";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
||||
|
||||
const EXPERIMENTAL_WARNING_FLAG = "--disable-warning=ExperimentalWarning";
|
||||
|
||||
export function getElectronExecutablePath() {
|
||||
return require("electron");
|
||||
}
|
||||
|
||||
export function getMainEntryPath() {
|
||||
return resolve(process.cwd(), "out/main/index.js");
|
||||
return resolve(repoRoot, "out/main/index.js");
|
||||
}
|
||||
|
||||
export function createElectronLaunchEnv(
|
||||
overrides: Record<string, string>,
|
||||
) : Record<string, string> {
|
||||
const env: Record<string, string> = {};
|
||||
|
||||
for (const [key, value] of Object.entries(process.env)) {
|
||||
if (typeof value === "string") {
|
||||
env[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(env, overrides);
|
||||
|
||||
if (env.FORCE_COLOR && env.NO_COLOR) {
|
||||
delete env.NO_COLOR;
|
||||
}
|
||||
|
||||
const existingNodeOptions = env.NODE_OPTIONS?.trim();
|
||||
if (!existingNodeOptions) {
|
||||
env.NODE_OPTIONS = EXPERIMENTAL_WARNING_FLAG;
|
||||
return env;
|
||||
}
|
||||
|
||||
if (!existingNodeOptions.includes(EXPERIMENTAL_WARNING_FLAG)) {
|
||||
env.NODE_OPTIONS = `${existingNodeOptions} ${EXPERIMENTAL_WARNING_FLAG}`;
|
||||
}
|
||||
|
||||
return env;
|
||||
}
|
||||
Reference in new issue
Block a user