From 584173f1798c664f3ea2741e7bdc664295b6a7cd Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Fri, 20 Dec 2024 18:45:45 -0500 Subject: [PATCH] Read version of args --- tasks/build-jsr.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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, }), );