Skip to content

Commit 9b1ab37

Browse files
committed
dev --version
1 parent b5ce0d2 commit 9b1ab37

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/usr/bin/env -S pkgx deno^2 run -A
22

3-
//TODO if you step into dev-dir/subdir does it work?
3+
//TODO if you step into dev-dir/subdir and type `dev` does it find the root properly?
44
//TODO dev off uses PWD which may not be correct if in subdir (obv)
55

66
import { Path, utils } from "libpkgx";
77
import shellcode from "./src/shellcode().ts";
88
import sniff from "./src/sniff.ts";
99
import shell_escape from "./src/shell-escape.ts";
10+
import app_version from "./src/app-version.ts";
1011

1112
switch (Deno.args[0]) {
1213
case "--help": {
@@ -20,6 +21,10 @@ switch (Deno.args[0]) {
2021
console.log(shellcode());
2122
Deno.exit(0);
2223
break; // deno lint insists
24+
case "--version":
25+
console.log(`dev ${app_version}`);
26+
Deno.exit(0);
27+
break; // deno lint insists
2328
}
2429

2530
const snuff = await sniff(Path.cwd());

src/app-version.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default "0.0.0+dev";

0 commit comments

Comments
 (0)