-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
76 lines (65 loc) · 1.84 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
version: 3
silent: true
vars:
NENV: "node_modules"
tasks:
_prettier:
internal: true
cmds:
- "{{.NENV}}/.bin/prettier {{.COMMAND}}"
_with_nvm:
internal: true
cmds:
- "source ${HOME}/.nvm/nvm.sh && nvm install && {{.COMMAND}}"
init:
desc: Initialize project environment
cmds:
- echo 'Installing node dependencies...'
- task: _with_nvm
vars: { COMMAND: "npm install" }
- echo 'Installing husky pre-commit...'
- task: _with_nvm
vars: { COMMAND: "npm run prepare" }
lint:
desc: Lint project
cmds:
- task: _with_nvm
vars: { COMMAND: "npm run lint:check" }
lint-fix:
desc: Lint fix project
cmds:
- task: _with_nvm
vars: { COMMAND: "npm run lint:fix" }
clean:
desc: Clean project environment
cmds:
- echo 'Cleaning node dependencies...'
- rm -rf {{.NENV}}
dependencies-update:
desc: Update dependencies
cmds:
- echo 'Updating node dependencies...'
- task: _with_nvm
vars: { COMMAND: "npm update" }
- task: _with_nvm
vars: { COMMAND: "npm outdated" }
- task: _with_nvm
vars: { COMMAND: "npm audit" }
update-from-template:
desc: Update project from template
cmds:
- echo 'Updating project from template...'
- cookiecutter
--no-input
--overwrite-if-exists
--output-dir ../
{{.TEMPLATE_PATH}}
project_name='fix-dubious-ownership-action'
project_slug='fix-dubious-ownership-action'
marketplace_name='fix-dubious-ownership-action'
action_type='composite'
node_version='v20.15.1'
owner_name='datalens-tech'
owner_github_login='datalens-tech'
vars:
TEMPLATE_PATH: '{{.TEMPLATE_PATH | default "https://github.com/ovsds/template-repository-github-action"}}'