-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathror.kdl
More file actions
50 lines (36 loc) · 908 Bytes
/
ror.kdl
File metadata and controls
50 lines (36 loc) · 908 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
default task="run" args="+list"
task run {
description "Runs the application"
cmd "go run ./cmd/ror"
}
task build {
description "Compiles the application"
cmd #"go build -o out/ror %%flags%% ./cmd/ror"# {
where flags=#"-ldflags="-X '%%env-pkg%%.commit=%%commit%%' -X '%%env-pkg%%.time=%%time%%'""# {
where env-pkg="github.com/dector/ror/internal/env"
where commit="git describe --tags --always --long --dirty" { execute }
where time="date +%Y-%m-%dT%H:%M:%SZ" { execute }
}
}
}
task install {
description "Installs the in ~/.local/bin"
depends {
on "build"
}
cmd "install -m 755 ./out/ror ~/.local/bin/ror"
}
task go {
description "Run Go directly"
cmd "go"
}
task test:env {
description "Setup env for tasks"
env GREET="Hello"
env NAME="User"
cmd "echo $GREET $NAME"
}
task echo {
description "Echoes all arguments"
cmd "echo"
}