-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ts
More file actions
29 lines (28 loc) · 919 Bytes
/
main.ts
File metadata and controls
29 lines (28 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { Command } from "@cliffy/command";
import denoJson from "./deno.json" with { type: "json" };
import {
defaultAction,
getCommand,
getVersionBumpCommand,
initCommand,
} from "./src/commands.ts";
await new Command()
.description(
`
A command line utility for managing your project version.
`,
)
.version(denoJson.version)
.name("version")
.action(defaultAction)
.command("init", initCommand)
.command("get", getCommand)
.command("pre", getVersionBumpCommand("pre"))
.command("major", getVersionBumpCommand("major"))
.command("premajor", getVersionBumpCommand("premajor"))
.command("minor", getVersionBumpCommand("minor"))
.command("preminor", getVersionBumpCommand("preminor"))
.command("patch", getVersionBumpCommand("patch"))
.command("prepatch", getVersionBumpCommand("prepatch"))
.command("prerelease", getVersionBumpCommand("prerelease"))
.parse(Deno.args);