linter: ensure make generate is up to date
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
4ffcdbf359
commit
2dfe2fccbe
7
Makefile
7
Makefile
@ -3,7 +3,7 @@ all: dagger
|
||||
|
||||
.PHONY: generate
|
||||
generate:
|
||||
go generate ./dagger
|
||||
@go generate ./dagger
|
||||
|
||||
.PHONY: dagger
|
||||
dagger: generate
|
||||
@ -11,9 +11,10 @@ dagger: generate
|
||||
|
||||
.PHONY: cuefmt
|
||||
cuefmt:
|
||||
(cd ./dagger && cue fmt -s ./... && cue trim -s ./...)
|
||||
@(cd ./dagger && cue fmt -s ./... && cue trim -s ./...)
|
||||
|
||||
.PHONY: lint
|
||||
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)"
|
||||
|
@ -50,8 +50,6 @@ package dagger
|
||||
compute?: #Script
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Any component can be referenced as a directory, since
|
||||
// every dagger script outputs a filesystem state (aka a directory)
|
||||
#Dir: #Component
|
||||
@ -122,6 +120,6 @@ package dagger
|
||||
|
||||
#TestScript: #Script & [
|
||||
{do: "fetch-container", ref: "alpine:latest"},
|
||||
{ do: "exec", args: ["echo", "hello", "world" ] }
|
||||
{do: "exec", args: ["echo", "hello", "world"]},
|
||||
]
|
||||
`
|
||||
|
Reference in New Issue
Block a user