-
Notifications
You must be signed in to change notification settings - Fork 45
/
kool.yml
28 lines (28 loc) · 1.29 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
scripts:
# Helper for local development
# 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.21 go
# Runs go CLI with Linux, independent of host OS
go:linux: kool docker --volume=kool_gopath:/go golang:1.21 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 -buildvcs=false -o kool-cli
install: mv ./kool-cli /usr/local/bin/kool
fmt: kool run go:linux fmt ./...
lint: kool docker --volume=kool_gopath:/go golangci/golangci-lint:v1.54.1 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/05-Commands-Reference/*.md
- kool run go:linux run docs.go
# build docker image locally
docker:build:rc: docker build --build-arg BUILD_VERSION=0.0.0-rc --pull -t kooldev/kool:rc .
docker:push:rc: docker push kooldev/kool:rc