diff --git a/.buildr/tasks.hcl b/.buildr/tasks.hcl index a58ae9a..c7ecd27 100644 --- a/.buildr/tasks.hcl +++ b/.buildr/tasks.hcl @@ -1,12 +1,21 @@ +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" + "buf generate", + "echo -e \"//go:build !wasi\\n\\n$(cat generated/rpc/v1/executor_grpc.pb.go)\" > generated/rpc/v1/executor_grpc.pb.go" ] out_dir = repo.root input_mapping = { - "api" = "api", + "rpc" = "rpc", + "buf.yaml" = "buf.yaml" "buf.gen.yaml" = "buf.gen.yaml" "buf.work.yaml" = "buf.work.yaml" } @@ -27,7 +36,6 @@ task "script" "golangci_lint" { depends_on = [ tasks.go_fmt.id, - tasks.go_generate.id, ] input_mapping = { diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0e0c1c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# buildr +.buildr/bin +.buildr/out +.buildr/logs +.buildr/.vaultpw +.buildr/state.sqlite \ No newline at end of file diff --git a/buf.gen.yaml b/buf.gen.yaml index 816a564..7508d2a 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -8,15 +8,15 @@ managed: - buf.build/googleapis/googleapis plugins: - plugin: buf.build/protocolbuffers/go:v1.31.0 - out: ./api/generated/ + out: ./generated/ opt: paths=source_relative - plugin: buf.build/grpc/go:v1.3.0 - out: ./api/generated/ + out: ./generated/ opt: - paths=source_relative - require_unimplemented_servers=false - plugin: buf.build/community/planetscale-vtprotobuf:v0.4.0 - out: ./api/generated/ + out: ./generated/ opt: - features=marshal+unmarshal+size+pool - paths=source_relative diff --git a/generated/rpc/v1/executor_grpc.pb.go b/generated/rpc/v1/executor_grpc.pb.go index cf33391..639ba6c 100644 --- a/generated/rpc/v1/executor_grpc.pb.go +++ b/generated/rpc/v1/executor_grpc.pb.go @@ -10,7 +10,6 @@ package rpcv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status"