-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
76 lines (73 loc) · 1.84 KB
/
Taskfile.yml
File metadata and controls
76 lines (73 loc) · 1.84 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: "3"
vars:
hostList: >
ibm.com ibm.com bbc.com amazon.com microsoft.com cisco.com workday.com o.canada.com
www.thespec.com www.thestar.com www.parliament.gov.za www.gov.za oracle.com:27 unknowndomain.cob
APPNAME: certcheck
targetbin: ~/bin
buildname: certcheck
dir: >
{{.DIR}}
tasks:
default:
cmds:
- echo "use 'task -l' to list tasks"
silent: true
build:
dir: .
cmds:
- goreleaser release --snapshot --rm-dist
install:
vars:
ARCH_VER:
sh: if [[ "{{ARCH}}" = "amd64" ]]; then echo "_v1"; else echo ""; fi
dir: ./dist/{{.buildname}}_{{OS}}_{{ARCH}}{{.ARCH_VER}}/
desc: "install in local bin directory"
cmds:
- task: build
- cmd: rm {{.targetbin}}/{{.buildname}}
ignore_error: true
- cp ./{{.buildname}} {{.targetbin}}
- cmd: echo "{{.completionmsg}}"
silent: true
release:
dir: .
desc: release to github using goreleaser
cmds:
- goreleaser release --rm-dist
clean-cache:
cmds:
- go clean -testcache
# install:
# desc: copy build file to local bin
# dir: .
# preconditions:
# - test -d {{.targetbin}}/
# cmds:
# - task: build
# - cmd: rm {{.targetbin}}/{{.buildname}} && cp ./build/{{.buildname}} {{.targetbin}}
# ignore_error: true
# build:
# desc: build app
# dir: cmd/{{.buildname}}
# cmds:
# - rm -f ../../build/{{.buildname}}
# - go build -o ../../build/{{.buildname}} .
test:
desc: test app
dir: .
cmds:
- go clean -testcache
- deps: build
- go test -v ./...
run:
desc: run from cli
dir: build
cmds:
- deps: build
- time echo "{{.hostList}}" | ./{{.buildname}} -j
makemarkdoc:
desc: generate markdown code documentation
dir: .
cmds:
- ./scripts/makemarkdown.sh