Add dual-mode self-update and multi-target binary build

This commit is contained in:
gitea committed 2026-08-25 13:51:53 +08:00
1 parent 85ca31f4ad
commit c86ee6a235
4 files changed
+207 -19

No files matched your search

+9
View File
@@ -111,6 +111,15 @@ describe("CLI version & help handling", () => {
expect(current.status).toBe(1);
expect(current.stderr).toContain("Stateless mode is enabled");
});
test("update command runs in source mode when executed from bun", () => {
const result = runCli(["update"]);
expect(result.status).toBe(0);
const parsed = JSON.parse(result.stdout.trim());
expect(parsed.updated).toBe(true);
expect(parsed.mode).toBe("source");
expect(parsed.version).toBe(VERSION);
});
});
function makeConfigEnv(): Record<string, string> {