Skip to content

Commit

Permalink
Read version of args
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Dec 20, 2024
1 parent 004989b commit 584173f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/build-jsr.ts
Original file line number Diff line number Diff line change
@@ -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,
}),
);

0 comments on commit 584173f

Please sign in to comment.