Release standalone binaries with a one-line installer
Installing meant Bun, a clone with the T3 Code submodule and a build. Now a tag builds a binary per platform with bun build --compile, carrying Bun's runtime and OpenTUI's native library, and publishes them as a GitHub Release after opening each one's dashboard on its own OS. install.sh picks the right binary and checks it against SHA256SUMS; `t3tui upgrade` replaces an installed binary with the latest release and `t3tui version` prints the version. `t3tui tmux` started its windows as `bun <file>`, which a compiled binary can't do, so it now runs itself.
This commit is contained in:
1 parent
c0b7615590
commit
9bf9abb540
10 files changed
+319
-2
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { expect, test } from "bun:test";
|
||||
|
||||
import { assetName, checksumFor, isCompiled } from "../src/upgrade.ts";
|
||||
|
||||
test("names the release asset for a platform", () => {
|
||||
expect(assetName("darwin", "arm64")).toBe("t3tui-darwin-arm64");
|
||||
});
|
||||
|
||||
test("reads a hash from a sha256sum listing", () => {
|
||||
const sums = "aaa t3tui-linux-x64.gz\nbbb *t3tui-darwin-arm64.gz\n";
|
||||
expect(checksumFor(sums, "t3tui-linux-x64.gz")).toBe("aaa");
|
||||
expect(checksumFor(sums, "t3tui-darwin-arm64.gz")).toBe("bbb");
|
||||
expect(checksumFor(sums, "t3tui-linux-arm64.gz")).toBeUndefined();
|
||||
});
|
||||
|
||||
test("knows it's running from source", () => {
|
||||
expect(isCompiled()).toBe(false);
|
||||
});
|
||||
Reference in new issue
Block a user