aboutsummaryrefslogtreecommitdiffstats
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--justfile28
1 files changed, 28 insertions, 0 deletions
diff --git a/justfile b/justfile
new file mode 100644
index 0000000..d944b13
--- /dev/null
+++ b/justfile
@@ -0,0 +1,28 @@
+name := 'forge'
+
+rootdir := ''
+prefix := '/usr'
+
+base-dir := absolute_path(clean(rootdir / prefix))
+
+bin-src := 'target' / 'release' / name
+bin-dst := base-dir / 'bin' / name
+
+default: build-release
+
+clean:
+ cargo clean
+
+build-debug *args:
+ cargo build {{args}}
+
+build-release *args: (build-debug '--release' args)
+
+run *args:
+ env RUST_BACKTRACE=full cargo run --release {{args}}
+
+install:
+ install -Dm0755 {{bin-src}} {{bin-dst}}
+
+uninstall:
+ rm {{bin-dst}}