feat(desktop): build macOS previews from a PR label (#8182)

This commit is contained in:
Theo Browne authored and GitHub committed 2026-08-25 02:47:06 -07:00
1 parent 06de9e90ab
commit c6b8bb8257
3 files changed
+220 -10

No files matched your search

+39
View File
@@ -223,6 +223,45 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
}),
);
it.effect("omits update feeds for pull request preview builds", () =>
Effect.gen(function* () {
const preview = yield* createBuildConfig(
"mac",
"dmg",
"0.0.33-pr.8182.1",
false,
false,
undefined,
undefined,
);
const release = yield* createBuildConfig(
"mac",
"dmg",
"0.0.33",
false,
false,
undefined,
undefined,
);
assert.notProperty(preview, "publish");
assert.deepStrictEqual(release.publish, [
{
provider: "github",
owner: "pingdotgg",
repo: "t3code",
releaseType: "release",
},
]);
}).pipe(
Effect.provide(
ConfigProvider.layer(
ConfigProvider.fromEnv({ env: { GITHUB_REPOSITORY: "pingdotgg/t3code" } }),
),
),
),
);
it("omits bundled workspace packages from staged desktop dependencies", () => {
assert.deepStrictEqual(
resolveDesktopRuntimeDependencies(
+16 -10
View File
@@ -2017,6 +2017,10 @@ export function resolveDesktopUpdateChannel(version: string): "latest" | "nightl
return /-nightly\.\d{8}\.\d+$/.test(version) ? "nightly" : "latest";
}
function isDesktopPreviewVersion(version: string): boolean {
return /-pr\./.test(version);
}
export function resolveDesktopWebAssetBrand(version: string): WebAssetBrand {
return resolveWebAssetBrandForChannel(resolveDesktopUpdateChannel(version));
}
@@ -2093,16 +2097,18 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
],
};
const updateChannel = resolveDesktopUpdateChannel(version);
const publishConfig = yield* resolveGitHubPublishConfig(updateChannel);
if (publishConfig) {
buildConfig.publish = [publishConfig];
} else if (mockUpdates) {
buildConfig.publish = [
{
provider: "generic",
url: resolveMockUpdateServerUrl(mockUpdateServerPort),
},
];
if (!isDesktopPreviewVersion(version)) {
const publishConfig = yield* resolveGitHubPublishConfig(updateChannel);
if (publishConfig) {
buildConfig.publish = [publishConfig];
} else if (mockUpdates) {
buildConfig.publish = [
{
provider: "generic",
url: resolveMockUpdateServerUrl(mockUpdateServerPort),
},
];
}
}
if (platform === "mac") {