Skip to content

Commit 9b33aab

Browse files
committed
[build-wasm-package.ts] Fix the version calculation.
1 parent 39f302b commit 9b33aab

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

script/build-wasm-package.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import assert from "node:assert";
44
import { es2022Lib } from "@cubing/dev-config/esbuild/es2022";
55
import { build } from "esbuild";
66
import { Path } from "path-class";
7+
import { PrintableShellCommand } from "printable-shell-command";
78

89
const distDir = Path.resolve("../dist/wasm/", import.meta.url);
910

@@ -69,9 +70,13 @@ assert(wasmSize > 32 * KiB); // Make sure the file exists and has some contents.
6970
*/
7071
assert(secondsToDownloadUsing3G(wasmSize) < 7);
7172

72-
// TODO: bump `@lgarron-bin/repo` with a fix (`latest(tags()::@-)'` instead of `latest(tags())::@-`).
73-
// const version = await $`bun x -- @lgarron-bin/repo version describe`.text();
74-
const version = "v0.9.99";
73+
const version = await new PrintableShellCommand("bun", [
74+
"x",
75+
"--",
76+
"@lgarron-bin/repo",
77+
"version",
78+
"describe",
79+
]).text();
7580

7681
await build({
7782
...es2022Lib(),

0 commit comments

Comments
 (0)