-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwerk.yml
89 lines (76 loc) · 1.57 KB
/
werk.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
version: "1"
description: "Manage Werk with Werk"
jobs:
main:
description: "Build application"
executor: local
needs:
- build:local
build:
executor: local
needs:
- build:local
- build:docker
build:local:
executor: local
commands:
- shards install --ignore-crystal-version
- shards build
needs:
- qa
build:docker:
description: Docker build
executor: local
commands:
- docker build -t werk .
needs:
- qa
qa:
description: Linters and tests
executor: local
needs:
- lint
- test
lint:
description: "Lint everything"
executor: local
needs:
- lint:crystal
- lint:dockerfile
lint:crystal:
description: "Lint code"
executor: docker
image: veelenga/ameba
commands:
- ameba
lint:dockerfile:
description: Lint Dockerfile
executor: local
commands:
- hadolint Dockerfile
test:
description: "Test code"
executor: local
commands:
- crystal spec
docs:
description: Generate API documentation
executor: local
commands:
- crystal docs
- open docs/index.html
install:
description: Install Werk locally
executor: local
commands:
- echo "Installing locally..."
- sudo cp -v ./bin/werk /usr/local/bin
needs:
- main
uninstall:
description: Uninstall Werk locally
executor: local
variables:
APP: /usr/local/bin/werk
commands:
- '[[ -f "${APP}" ]] && sudo rm -vf "${APP}" || echo "Werk is not installed!"'