forked from kool-dev/kool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kool.yml
35 lines (35 loc) · 1.48 KB
/
kool.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
scripts:
# Helper for local development - parsing presets onto Go,
# compiling and installing locally
dev:
- kool run compile
- kool run install
# Runs go CLI with proper version for kool development (targets host OS passing down GOOS)
go: kool docker --volume=kool_gopath:/go --env='GOOS=$GOOS' golang:1.16 go
# Runs go CLI with Linux, independent of host OS
go:linux: kool docker --volume=kool_gopath:/go golang:1.16 go
# Compiling kool itself. In case you are on MacOS make sure to have your .env
# file properly setting GOOS=darwin so you will be able to use the binary.
compile:
- kool run fmt
- kool run go build -o kool
install:
- mv kool /usr/local/bin/kool
fmt: kool run go:linux fmt ./...
lint: kool docker --volume=kool_gopath:/go golangci/golangci-lint:v1.38.0 golangci-lint run -v
test: kool run test:path ./...
test:path: kool run go:linux test -race
test-coverage: kool run go:linux test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
# Generate documentation for kool commands
make-docs:
- rm -f docs/4-Commands/*.md
- kool run go:linux run docs.go
# Parsing the preset files onto Go code in an automated fashion.
parse-presets:
- rm -f core/presets/presets.go
- rm -f core/presets/templates.go
- rm -f core/presets/configs.go
- kool run go:linux run gen/parse_presets.go
- kool run go:linux run gen/parse_templates.go
- kool run go:linux run gen/parse_presets_configs.go
- kool run fmt