-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathTaskfile.yaml
127 lines (113 loc) · 2.8 KB
/
Taskfile.yaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: '3'
env:
GENERATE_SOURCEMAP: false
DISABLE_ESLINT_PLUGIN: true
interval: '500ms'
output: prefixed
tasks:
web-deps:
internal: true
label: "Installing dependencies for {{.APP}}"
prefix: "deps-{{.APP}}"
dir: lib/{{.APP}}
cmds:
- yarn --no-progress --non-interactive --silent install --mutex file:../../yarn.mutex
sources:
- package.json
generates:
- build/index.html
web-build:
label: "Building web app: {{.APP}}"
internal: true
prefix: "build-{{.APP}}"
dir: 'lib/{{.APP}}'
cmds:
- yarn --no-progress --non-interactive --silent build
web-copy:
label: "Copying web app resources: {{.APP}}"
internal: true
prefix: "copy-{{.APP}}"
cmds:
- 'rm -rf resources/static/{{.APP}}'
- 'mv lib/{{.APP}}/build/ resources/static/{{.APP}}/'
web-cleanup:
label: "Cleaning up: {{.APP}}"
internal: true
prefix: "cleanup-{{.APP}}"
ignore_error: true
cmds:
- 'rm -rf lib/{{.APP}}/node_modules/'
web-item:
label: "Build and copy webapp: {{.APP}}"
internal: true
cmds:
- task: web-deps
vars: { APP: '{{.APP}}' }
- task: web-build
vars: { APP: '{{.APP}}' }
- task: web-copy
vars: { APP: '{{.APP}}' }
- task: web-cleanup
vars: { APP: '{{.APP}}' }
sources:
- 'lib/{{.APP}}/src/**/*.json'
- 'lib/{{.APP}}/src/**/*.js'
- 'lib/{{.APP}}/src/**/*.ts'
- 'lib/{{.APP}}/src/**/*.css'
- 'lib/{{.APP}}/src/**/*.html'
- 'lib/{{.APP}}/src/**/*.svg'
- 'lib/{{.APP}}/src/**/*.png'
- 'lib/{{.APP}}/src/**/*.ico'
- 'lib/{{.APP}}/src/**/*.txt'
- 'lib/{{.APP}}/src/**/*.md'
- 'lib/{{.APP}}/src/**/*.woff2'
generates:
- 'resources/static/{{.APP}}/index.html'
create-resources-folder:
label: "Make sure resources/static/ exists"
internal: true
cmds:
- mkdir -p resources/static/
generates:
- resources/static/
status:
- test -d resources/static
web-apps:
label: "Build web apps"
internal: true
deps:
- task: web-item
vars: { APP: 'graphiql' }
- task: web-item
vars: { APP: 'voyager' }
web:
cmds:
- task: create-resources-folder
- task: web-apps
kotlin:
label: "Build kotlin app"
cmds:
- ./gradlew build
sources:
- build.gradle
- src/**/*.kt
- resources/**/*.js
- resources/**/*.json
- resources/**/*.css
- resources/**/*.html
- resources/**/*.png
- resources/**/*.svg
- resources/**/*.ico
- resources/**/*.txt
- resources/**/*.md
- resources/**/*.woff2
generates:
- InQL.jar
all:
label: "Run all commands"
cmds:
- task: web
- task: kotlin
default:
cmds:
- task: all