mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? ~Enforce `temporal/cmd/tools/protogen` to set the PATH to point to the locally installed tools in `.bin`.~ Enforce `temporal/cmd/tools/protogen` to use locally installed protoc plugins. ## Why? Without this, it will use whatever is on the PATH; which might not be the same as in `.bin`. ## How did you test it? - [ ] built - [x] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) Without this change, I get different `.pb.go` files emitted as my global proto-gen-go is used.
21 lines
964 B
Bash
Executable File
21 lines
964 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# These mocks need to be manually fixed up after generation because gomock
|
|
# uses the types in the internal package instead of the public type aliases.
|
|
|
|
mockgen -package "$GOPACKAGE" go.temporal.io/sdk/client Client | \
|
|
sed -e 's,internal,client,g' \
|
|
> client_mock.go
|
|
|
|
mockgen -package "$GOPACKAGE" go.temporal.io/sdk/worker Worker | \
|
|
sed -e 's,internal.RegisterWorkflowOptions,workflow.RegisterOptions,g' \
|
|
-e 's,internal.RegisterActivityOptions,activity.RegisterOptions,g' \
|
|
-e 's,internal.DynamicRegisterWorkflowOptions,workflow.DynamicRegisterOptions,g' \
|
|
-e 's,internal.DynamicRegisterActivityOptions,activity.DynamicRegisterOptions,g' \
|
|
-e 's,internal "go.temporal.io/sdk/internal",activity "go.temporal.io/sdk/activity"\n\tworkflow "go.temporal.io/sdk/workflow",' \
|
|
> worker_mock.go
|
|
|
|
mockgen -package "$GOPACKAGE" go.temporal.io/sdk/client WorkflowRun | \
|
|
sed -e 's,internal,client,g' \
|
|
> workflowrun_mock.go
|