Skip to content

Commit 3bba753

Browse files
committed
chore(build): update binary path for marcode and copy bun.lock during desktop artifact build
- Adjust binary path in `bun.lock` and `package.json` (`./dist/index.mjs` -> `./dist/bin.mjs`) - Copy `bun.lock` to staging directory for deterministic dependency installs during desktop artifact build
1 parent e3be5a2 commit 3bba753

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

apps/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"directory": "apps/server"
99
},
1010
"bin": {
11-
"marcode": "./dist/index.mjs"
11+
"marcode": "./dist/bin.mjs"
1212
},
1313
"files": [
1414
"dist"

bun.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build-desktop-artifact.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,15 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* (
684684
const stagePackageJsonString = yield* encodeJsonString(stagePackageJson);
685685
yield* fs.writeFileString(path.join(stageAppDir, "package.json"), `${stagePackageJsonString}\n`);
686686

687+
const repoLockfile = path.join(repoRoot, "bun.lock");
688+
const stageLockfile = path.join(stageAppDir, "bun.lock");
689+
if (yield* fs.exists(repoLockfile)) {
690+
yield* fs.copy(repoLockfile, stageLockfile);
691+
yield* Effect.log(
692+
"[desktop-artifact] Copied bun.lock to staging directory for deterministic installs",
693+
);
694+
}
695+
687696
yield* Effect.log("[desktop-artifact] Installing staged production dependencies...");
688697
yield* runCommand(
689698
ChildProcess.make({

0 commit comments

Comments
 (0)