Skip to content

Commit 891b5e9

Browse files
committed
for building and installing
1 parent ab796af commit 891b5e9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Taskfile.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# https://taskfile.dev
2+
3+
version: "3"
4+
5+
vars:
6+
GREETING: Hello, World!
7+
targetbin: ~/bin
8+
buildname: wordle
9+
10+
tasks:
11+
default:
12+
cmds:
13+
- echo "{{.GREETING}}"
14+
silent: true
15+
install:
16+
desc: copy build file to local bin
17+
dir: .
18+
preconditions:
19+
- test -d {{.targetbin}}/
20+
cmds:
21+
- task: build
22+
- cmd: rm {{.targetbin}}/{{.buildname}}
23+
ignore_error: true
24+
- cp ./{{.buildname}} {{.targetbin}}
25+
- rm -f ./{{.buildname}}
26+
build:
27+
desc: build app
28+
dir: .
29+
cmds:
30+
- go build -o {{.buildname}} .

0 commit comments

Comments
 (0)