diff --git a/tasks/build-jsr.ts b/tasks/build-jsr.ts index 98b178d9..387d31d0 100644 --- a/tasks/build-jsr.ts +++ b/tasks/build-jsr.ts @@ -1,9 +1,14 @@ import jsonDeno from "../deno.json" with { type: "json" }; +let [version] = Deno.args; +if (!version) { + throw new Error("a version argument is required to build the npm package"); +} + await Deno.writeTextFile( new URL("../deno.json", import.meta.url), JSON.stringify({ ...jsonDeno, - version: Deno.env.get("VERSION"), + version, }), );