-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
cmdx.yaml
86 lines (86 loc) · 2.33 KB
/
cmdx.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
---
# the configuration file of cmdx - task runner
# https://github.com/suzuki-shunsuke/cmdx
tasks:
- name: test
short: t
description: test
usage: test
script: go test ./... -race -covermode=atomic
- name: vet
short: v
description: go vet
usage: go vet
script: go vet ./...
- name: lint
short: l
description: lint the go code
usage: lint the go code
script: golangci-lint run
- name: release
short: r
description: release the new version
usage: release the new version
script: |
set -eux
git tag -m "chore: release {{.version}}" "{{.version}}"
git push origin "{{.version}}"
args:
- name: version
required: true
validate:
- regexp: "^v\\d+\\.\\d+.\\d+(-.+)?$"
- name: build
description: go build
usage: go build
script: go build -o dist/aqua ./cmd/aqua
- name: coverage
short: c
description: coverage test
usage: coverage test
script: "bash scripts/coverage.sh {{.target}}"
args:
- name: target
- name: wire
short: w
description: google/wire
usage: google/wire
script: "wire ./..."
- name: js
description: Generate JSON Schema
usage: Generate JSON Schema
script: "go run ./cmd/gen-jsonschema"
- name: validate-js
description: Validate aqua.yaml and registry.yaml with JSON Schema
usage: Validate aqua.yaml and registry.yaml with JSON Schema
# https://ajv.js.org/packages/ajv-cli.html
script: |
set -eux
ajv --spec=draft2020 -s json-schema/aqua-yaml.json -d aqua.yaml
ajv --spec=draft2020 -s json-schema/registry.json -d tests/main/registry.yaml
- name: install
short: i
description: Build and install aqua
usage: Build and install aqua by "go install" command
script: go install ./cmd/aqua
- name: run
description: Run aqua via go run
usage: Run aqua via go run
script: |
go run ./cmd/aqua {{._builtin.args_string}}
- name: docker
description: |
Build and run a new container and attach a pseudo-TTY.
You can test aqua in a clean environment.
usage: Test aqua in a clean container
script: |
set -eux
{{if .latest}}
bash scripts/docker.sh latest
{{else}}
bash scripts/docker.sh
{{end}}
flags:
- name: latest
short: l
type: bool