This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/Makefile
Andrea Luzzardi 2dfe2fccbe linter: ensure make generate is up to date
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-01-08 17:29:06 +01:00

21 lines
479 B
Makefile

.PHONY: all
all: dagger
.PHONY: generate
generate:
@go generate ./dagger
.PHONY: dagger
dagger: generate
go build -o ./cmd/dagger/ ./cmd/dagger/
.PHONY: cuefmt
cuefmt:
@(cd ./dagger && cue fmt -s ./... && cue trim -s ./...)
.PHONY: lint
lint: generate cuefmt
golangci-lint run
@test -z "$$(git status -s . | grep -e "^ M" | grep .cue | cut -d ' ' -f3 | tee /dev/stderr)"
@test -z "$$(git status -s . | grep -e "^ M" | grep gen.go | cut -d ' ' -f3 | tee /dev/stderr)"