Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions scripts/build-desktop-artifact.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
owner: "pingdotgg",
repo: "t3code",
releaseType: "release",
channel: "latest",
});
assert.deepStrictEqual(nightlyConfig, {
provider: "github",
Expand Down Expand Up @@ -371,6 +372,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
owner: "pingdotgg",
repo: "t3code",
releaseType: "release",
channel: "latest",
},
]);
}).pipe(
Expand All @@ -382,6 +384,24 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
),
);

it.effect("publishes fork builds to the latest feed", () =>
Effect.gen(function* () {
const config = yield* createBuildConfig(
"mac",
"zip",
"0.1.0-fork.20261019.1",
false,
true,
3000,
undefined,
);

assert.deepStrictEqual(config.publish, [
{ provider: "generic", url: "http://localhost:3000", channel: "latest" },
]);
}).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
);

it("stages only the desktop main-process externals", () => {
assert.deepStrictEqual(
resolveDesktopRuntimeDependencies(
Expand Down
5 changes: 4 additions & 1 deletion scripts/build-desktop-artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2620,7 +2620,9 @@ export const resolveGitHubPublishConfig = Effect.fn("resolveGitHubPublishConfig"
owner,
repo,
releaseType: updateChannel === "nightly" ? "prerelease" : "release",
...(updateChannel === "nightly" ? { channel: "nightly" as const } : {}),
// Left unset, electron-builder names the feed after the prerelease identifier, so a `-fork.`
// build would write `fork-mac.yml` while the app reads `latest-mac.yml`.
channel: updateChannel,
};
});

Expand Down Expand Up @@ -2736,6 +2738,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
{
provider: "generic",
url: resolveMockUpdateServerUrl(mockUpdateServerPort),
channel: updateChannel,
},
];
}
Expand Down