api/.buildr/tasks.hcl

45 lines
No EOL
888 B
HCL

task "script" "go_fmt" {
inline = [
"go fmt ${join(" ", toset([for s in vcs.staged_files : "code.icb4dc0.de/buildr/api/${dirname(s)}" if ext(s) == ".go"]))}"
]
continue_on_error = true
}
task "script" "buf_generate" {
inline = [
"buf generate"
]
out_dir = repo.root
input_mapping = {
"common" = "common",
"remote" = "remote",
"wasi" = "wasi",
"buf.yaml" = "buf.yaml"
"buf.gen.yaml" = "buf.gen.yaml"
"buf.work.yaml" = "buf.work.yaml"
}
container {
image = "docker.io/bufbuild/buf"
}
}
task "script" "golangci_lint" {
inline = [
"golangci-lint run -v"
]
container {
image = "golangci/golangci-lint"
}
depends_on = [
tasks.go_fmt.id,
]
input_mapping = {
"${repo.root}" = "."
}
}