-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
96 lines (85 loc) · 2.64 KB
/
Taskfile.yml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3"
set: [errexit, nounset, pipefail]
shopt: [globstar]
includes:
lint:
taskfile: https://github.com/nikaro/meta/raw/tasks-v1/taskfiles/lint.yml
internal: true
format:
taskfile: https://github.com/nikaro/meta/raw/tasks-v1/taskfiles/format.yml
internal: true
go:
taskfile: https://github.com/nikaro/meta/raw/tasks-v1/taskfiles/go.yml
vars:
BUILD_TARGETS:
- linux/amd64
- linux/arm64
- darwin/amd64
- darwin/arm64
- windows/amd64
- windows/arm64
env:
APP: goresume
PREFIX:
sh: echo ${PREFIX:-/usr/local}
BINDIR:
sh: echo ${BINDIR:-${PREFIX:-/usr/local}/bin}
MANDIR:
sh: echo ${MANDIR:-${PREFIX:-/usr/local}/share/man}
SHAREDIR:
sh: echo ${SHAREDIR:-${PREFIX:-/usr/local}/share/${APP:-goresume}}
tasks:
init:
desc: Initialize repositry
cmds:
- git config core.hooksPath .githooks
- git config commit.template .gitmessage
lint:
desc: Run linters
cmds:
- task: lint:default
- task: go:lint
format:
desc: Run formatters
cmds:
- task: format:default
- task: go:format
bump:
desc: Bump version
preconditions:
- cz --no-raise 3,21 bump --dry-run --changelog --changelog-to-stdout > ./_changelog.md
cmd: cz --no-raise 3,21 bump --changelog --changelog-to-stdout > ./_changelog.md
release:
desc: Publish release
preconditions:
- test -n "$AUR_KEY"
- test -n "$GITHUB_TOKEN"
cmds:
- goreleaser release --clean --release-notes ./_changelog.md
- defer: rm -rf _changelog.md
install:
desc: Install the application
deps: ["go:build"]
cmds:
- install -Dm755 ./build/${APP}-${GOOS}-${GOARCH} ${BINDIR}/${APP}
uninstall:
desc: Uninstall the application
cmds:
- rm -rf ${BINDIR}/${APP}
- rmdir --ignore-fail-on-non-empty ${BINDIR}
docs:
desc: Generate project webiste content
sources:
- ./README.md
- ./docs/resume.json
generates:
- ./docs/index.html
- ./docs/simple.html
- ./docs/simple-compact.html
- ./docs/actual.html
- ./docs/actual.pdf
cmds:
- pandoc ./README.md --output=./docs/index.html --css=https://cdn.simplecss.org/simple.min.css --metadata=title=${APP} --standalone
- go run . export --resume=./docs/resume.json --html-output=docs/simple.html --pdf=false
- go run . export --resume=./docs/resume.json --html-theme=simple-compact --html-output=./docs/simple-compact.html --pdf=false
- go run . export --resume=./docs/resume.json --html-theme=actual --html-output=./docs/actual.html --pdf-theme=actual --pdf-output=./docs/actual.pdf