2023-08-17 15:01:50 +00:00
|
|
|
task "script" "go_fmt" {
|
2023-08-30 18:43:07 +00:00
|
|
|
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
|
2023-08-17 15:01:50 +00:00
|
|
|
}
|
|
|
|
|
2023-08-16 16:31:32 +00:00
|
|
|
task "script" "buf_generate" {
|
2023-08-30 18:43:07 +00:00
|
|
|
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"
|
|
|
|
}
|
2023-08-16 16:31:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task "script" "golangci_lint" {
|
2023-08-30 18:43:07 +00:00
|
|
|
inline = [
|
|
|
|
"golangci-lint run -v"
|
|
|
|
]
|
2023-08-16 16:31:32 +00:00
|
|
|
|
2023-08-30 18:43:07 +00:00
|
|
|
container {
|
|
|
|
image = "golangci/golangci-lint"
|
|
|
|
}
|
2023-08-16 16:31:32 +00:00
|
|
|
|
2023-08-30 18:43:07 +00:00
|
|
|
depends_on = [
|
|
|
|
tasks.go_fmt.id,
|
|
|
|
]
|
2023-08-16 16:31:32 +00:00
|
|
|
|
2023-08-30 18:43:07 +00:00
|
|
|
input_mapping = {
|
|
|
|
"${repo.root}" = "."
|
|
|
|
}
|
2023-08-16 16:31:32 +00:00
|
|
|
}
|