Skip to content

Commit 880a2c7

Browse files
committed
chore: fix build npm scripts
1 parent dbaf1cc commit 880a2c7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

deno.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"version": "0.2.0",
23
"imports": {
34
"dnt/": "https://deno.land/x/[email protected]/",
45
"fmt/": "https://deno.land/[email protected]/fmt/",

scripts/build_npm.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { build, emptyDir } from "dnt/mod.ts";
22
import { bgGreen } from "fmt/colors.ts";
33

4-
const cmd = Deno.run({
5-
cmd: ["git", "describe", "--tags", "--abbrev=0"],
6-
stdout: "piped",
7-
});
8-
const version = new TextDecoder().decode(await cmd.output()).trim();
9-
cmd.close();
4+
const denoInfo = JSON.parse(
5+
Deno.readTextFileSync(new URL("../deno.json", import.meta.url)),
6+
);
7+
const version = denoInfo.version;
108

119
console.log(bgGreen(`version: ${version}`));
1210

0 commit comments

Comments
 (0)