| author | |
| committer | |
| log | 9ff31f8c35736a9f179996d65803244b11841246 |
| tree | c9594dd9f4eae549fc1af2774cc639e7c980ad5c |
| parent | 409ff90a1401c0b8e2bef05d73b3be57ff9bc669 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: codex <codex@users.noreply.github.com>2 files changed, 13 insertions(+), 3 deletions(-)
scripts/build-desktop-artifact.test.ts+6| ... | ... | @@ -5,6 +5,7 @@ import { ConfigProvider, Effect, Option } from "effect"; |
| 5 | 5 | import { |
| 6 | 6 | resolveBuildOptions, |
| 7 | 7 | resolveDesktopBuildIconAssets, |
| 8 | resolveDesktopProductName, | |
| 8 | 9 | resolveDesktopUpdateChannel, |
| 9 | 10 | resolveMockUpdateServerPort, |
| 10 | 11 | resolveMockUpdateServerUrl, |
| ... | ... | @@ -17,6 +18,11 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => { |
| 17 | 18 | assert.equal(resolveDesktopUpdateChannel("0.0.17"), "latest"); |
| 18 | 19 | }); |
| 19 | 20 | |
| 21 | it("switches desktop packaging product names to nightly for nightly builds", () => { | |
| 22 | assert.equal(resolveDesktopProductName("0.0.17"), "T3 Code (Alpha)"); | |
| 23 | assert.equal(resolveDesktopProductName("0.0.17-nightly.20260413.42"), "T3 Code (Nightly)"); | |
| 24 | }); | |
| 25 | ||
| 20 | 26 | it("switches desktop packaging icons to the nightly artwork for nightly versions", () => { |
| 21 | 27 | assert.deepStrictEqual(resolveDesktopBuildIconAssets("0.0.17"), { |
| 22 | 28 | macIconPng: BRAND_ASSET_PATHS.productionMacIconPng, |
scripts/build-desktop-artifact.ts+7-3| ... | ... | @@ -503,10 +503,15 @@ export function resolveMockUpdateServerUrl(mockUpdateServerPort: number | undefi |
| 503 | 503 | return `http://localhost:${mockUpdateServerPort ?? 3000}`; |
| 504 | 504 | } |
| 505 | 505 | |
| 506 | export function resolveDesktopProductName(version: string): string { | |
| 507 | return resolveDesktopUpdateChannel(version) === "nightly" | |
| 508 | ? "T3 Code (Nightly)" | |
| 509 | : (desktopPackageJson.productName ?? "T3 Code"); | |
| 510 | } | |
| 511 | ||
| 506 | 512 | const createBuildConfig = Effect.fn("createBuildConfig")(function* ( |
| 507 | 513 | platform: typeof BuildPlatform.Type, |
| 508 | 514 | target: string, |
| 509 | productName: string, | |
| 510 | 515 | version: string, |
| 511 | 516 | signed: boolean, |
| 512 | 517 | mockUpdates: boolean, |
| ... | ... | @@ -514,7 +519,7 @@ const createBuildConfig = Effect.fn("createBuildConfig")(function* ( |
| 514 | 519 | ) { |
| 515 | 520 | const buildConfig: Record<string, unknown> = { |
| 516 | 521 | appId: "com.t3tools.t3code", |
| 517 | productName, | |
| 522 | productName: resolveDesktopProductName(version), | |
| 518 | 523 | artifactName: "T3-Code-${version}-${arch}.${ext}", |
| 519 | 524 | directories: { |
| 520 | 525 | buildResources: "apps/desktop/resources", |
| ... | ... | @@ -732,7 +737,6 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* ( |
| 732 | 737 | build: yield* createBuildConfig( |
| 733 | 738 | options.platform, |
| 734 | 739 | options.target, |
| 735 | desktopPackageJson.productName ?? "T3 Code", | |
| 736 | 740 | appVersion, |
| 737 | 741 | options.signed, |
| 738 | 742 | options.mockUpdates, |