mirror of https://github.com/hashicorp/terraform
Since protoc is not go-gettable, and most development tasks in Terraform won't involve recompiling protoc files anyway, we'll use a separate mechanism for these. This way "go generate" only depends on things we can "go get" in the "make tools" target. In a later commit we should also in some way specify a particular version of protoc to use so that we don't get "flapping" regenerations as developers work with different versions, but the priority here is just to make "make generate" minimally usable again to restore the dev workflow documented in the README. This also includes some updates that resulted from running "make generate" and "make protobuf" after those Makefile changes were in place.pull/19117/head
parent
47921bddb7
commit
ec57927ea3
@ -1,3 +0,0 @@
|
||||
package planproto
|
||||
|
||||
//go:generate protoc --go_out=paths=source_relative:. planfile.proto
|
||||
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# We do not run protoc under go:generate because we want to ensure that all
|
||||
# dependencies of go:generate are "go get"-able for general dev environment
|
||||
# usability. To compile all protobuf files in this repository, run
|
||||
# "make protobuf" at the top-level.
|
||||
|
||||
set -eu
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
cd "$DIR"
|
||||
|
||||
protoc --go_out=paths=source_relative:. planfile.proto
|
||||
@ -1,3 +0,0 @@
|
||||
//go:generate protoc -I ./ plugin.proto --go_out=plugins=grpc:./
|
||||
|
||||
package proto
|
||||
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# We do not run protoc under go:generate because we want to ensure that all
|
||||
# dependencies of go:generate are "go get"-able for general dev environment
|
||||
# usability. To compile all protobuf files in this repository, run
|
||||
# "make protobuf" at the top-level.
|
||||
|
||||
set -eu
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
cd "$DIR"
|
||||
|
||||
protoc -I ./ plugin.proto --go_out=plugins=grpc:./
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue