-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathTaskfile.yml
144 lines (121 loc) · 3.62 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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: '3'
dotenv: ['.env', 'development/project/.env', '.env.codeartifact']
env:
REPOLINTER_DIR: ${HOME}/.repolinter
REPOLINTER_RULESET: ${HOME}/.repolinter/repolinter.json
includes:
codeartifact:
taskfile: Taskfile.codeartifact.yml
samples:
taskfile: Taskfile.sample-app.yml
tasks:
init:
desc: Initialize local dev-environment
cmds:
- task: refresh
- task: init:githook
init:githook:
desc: Initialize git hook
cmds:
- npm run husky
clean:
desc: Clean the project
summary: Removes all the generated folders and returns the project to a clean state.
cmds:
- rm -rf node_modules
- rm -rf dist
- rm -rf coverage
- task: refresh
refresh:
desc: Recover after project has been cleaned
summary: Reinstall all dependencies based on yarn.lock and execute Projen
preconditions:
- test -f .projenrc.ts
- test -f yarn.lock
cmds:
- yarn install --frozen-lockfile
- npm run projen
build:
desc: Build the project
cmds:
- npm run build
fix:
desc: Run autofix on the project
cmds:
- task refresh
- npm run lint -- --fix
- npm run validate:fix
- npm run license -- --fix
before-commit:
desc: Commands to ensure good quality at commit
cmds:
- task: upgrade
audit:
desc: Run audit steps on the project
cmds:
- npm run check-dependencies
- npm run audit
- npm run license
docs:
desc: Generate documentation with mkdocs
dir: docs
cmds:
- ./scripts/build-docs
docs:local:
desc: Create a webserver to host the documentation
summary: |
This command is useful to work on documentation of the project.
It run a webs server to host the generated html pages
dir: docs
cmds:
- build/docs/.venv/bin/mkdocs serve
docs:deploy:
desc: Deploy the documentation
summary: |
This command is a temporarily solution to update the documentation on GitHub.
dir: docs
cmds:
- build/docs/.venv/bin/mkdocs gh-deploy
release-util:list-direct-dependencies:
desc: List direct dependencies of the project
summary: List direct dependencies of the project. This is useful when artifact has to be provided for review processes.
vars:
NPM_LICENSE_CHECKER_TOOL: license-checker-rseidelsohn
VERSION: 4.3.0
cmds:
- npx -y {{.NPM_LICENSE_CHECKER_TOOL}}@{{.VERSION}} --nopeer --direct 1 --limitAttributes licenses,repository,publisher {{.CLI_ARGS}}
release-util:repolinter_install:
desc: Install repolinter
summary: |
Install repolinter a tool that is used to provide in-depth analyses. This task only donwlods and install the tool.
The `release-util:repolinter` task will run the tool. That requires a configuration file.
dir: "{{.REPOLINTER_DIR}}"
run: once
status:
- test -d {{.REPOLINTER_DIR}}
cmds:
- mkdir -p {{.REPOLINTER_DIR}}
- git clone https://github.com/todogroup/repolinter.git .
- npm install
release-util:repolinter:
desc: Run repo linter
env:
NODE_OPTIONS: --max-old-space-size=127284016
preconditions:
- test -t ${HOME}/.repolinter/repolinter.json
deps:
- repolinter_install
cmds:
- node {{.REPOLINTER_DIR}}/bin/repolinter.js lint . -r {{.REPOLINTER_RULESET}} {{.CLI_ARGS}}
upgrade:
desc: Upgrade project and samples versions
vars:
SAMPLES:
sh: task samples:list
cmds:
- npm run upgrade
- task: fix
- for: { var: SAMPLES, split: "/n"}
task: samples:upgrade
vars:
SAMPLE_APP: '{{.ITEM}}'