Skip to content

Commit 22e1a1e

Browse files
donjor-agent[bot]donjor
authored andcommitted
fix(release): build only AppImages for fork Linux releases (#1768)
Closes #1758 Fork-Domain: distribution Fork-Tier: bugfix Fork-Upstreamable: no Co-authored-by: donjor <[email protected]>
1 parent 20b4aa4 commit 22e1a1e

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

‎scripts/build-desktop-artifact.fork.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ it("resolves updater channels for upstream and fork release versions", () => {
1717
});
1818

1919
it.layer(NodeServices.layer)((it) => {
20+
it.effect("builds only the attached AppImage target for stable and nightly fork releases", () =>
21+
Effect.gen(function* () {
22+
const linuxTargets = (version: string) =>
23+
createBuildConfig("linux", "AppImage", version, false, false, undefined, undefined).pipe(
24+
Effect.map((config) => (config.linux as { target: string[] }).target),
25+
);
26+
27+
assert.deepStrictEqual(yield* linuxTargets("0.1.0-hyprws.1"), ["AppImage"]);
28+
assert.deepStrictEqual(yield* linuxTargets("0.1.0-hyprws-nightly.20261016.1"), ["AppImage"]);
29+
assert.deepStrictEqual(yield* linuxTargets("0.1.0"), ["AppImage", "deb"]);
30+
}),
31+
);
32+
2033
it.effect("names the fork in the Linux launcher and keeps the app identity", () =>
2134
Effect.gen(function* () {
2235
const linuxEntry = (version: string) =>

‎scripts/build-desktop-artifact.fork.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { isForkServiceVersion } from "@t3tools/shared/forkVersion";
2+
13
/**
24
* Fork: the launcher name embedded in the Linux desktop entry, so a fork
35
* AppImage reads as the fork in app menus (RSI-Software/t3code-hyprws#176).
@@ -7,3 +9,8 @@
79
export function forkDesktopEntryName(channel: "latest" | "nightly"): string {
810
return channel === "nightly" ? "T3 Code (hyprws Nightly)" : "T3 Code (hyprws)";
911
}
12+
13+
/** Fork releases attach only AppImages; do not advertise an unattached .deb in the update feed. */
14+
export function forkLinuxTargets(target: string, version: string): string[] {
15+
return target === "AppImage" && !isForkServiceVersion(version) ? [target, "deb"] : [target];
16+
}

‎scripts/build-desktop-artifact.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import * as Schema from "effect/Schema";
6060
import * as Stream from "effect/Stream";
6161
import { Command, Flag } from "effect/cli";
6262
import { ChildProcess, ChildProcessSpawner } from "effect/process";
63-
import { forkDesktopEntryName } from "./build-desktop-artifact.fork.ts"; // fork-hook: distribution/desktop-entry-name-import
63+
import { forkDesktopEntryName, forkLinuxTargets } from "./build-desktop-artifact.fork.ts"; // fork-hook: distribution/desktop-entry-name-import
6464
import {
6565
enableVoiceInputMacEntitlementsFork,
6666
voiceInputMacPurposeFork,
@@ -2922,6 +2922,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
29222922
},
29232923
},
29242924
};
2925+
(buildConfig.linux as { target: string[] }).target = forkLinuxTargets(target, version); // fork-hook: distribution/linux-targets
29252926
buildConfig.deb = {
29262927
// FPM runs outside the staged app directory, so source paths must be absolute.
29272928
fpm: [

0 commit comments

Comments
 (0)