Skip to content

Commit

Permalink
chore: updated Makefile and mmv builder (GoogleCloudPlatform#12314)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyardley authored Jan 6, 2025
1 parent 9e815a4 commit 4bee7ca
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ terraform build provider:
make tpgtools

mmv1:
# Chaining these with "&&" is critical so this will exit non-0 if the first
# command fails, since we're not forcing bash and errexit / pipefail here.
cd mmv1;\
if [ "$(VERSION)" = "ga" ]; then \
go run . --output $(OUTPUT_PATH) --version ga --no-docs $(mmv1_compile); \
go run . --output $(OUTPUT_PATH) --version beta --no-code $(mmv1_compile); \
go run . --output $(OUTPUT_PATH) --version ga --no-docs $(mmv1_compile) \
&& go run . --output $(OUTPUT_PATH) --version beta --no-code $(mmv1_compile); \
else \
go run . --output $(OUTPUT_PATH) --version $(VERSION) $(mmv1_compile); \
fi
Expand Down
8 changes: 6 additions & 2 deletions mmv1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,13 @@ func main() {
}

startTime := time.Now()
providerName := "default (terraform)"
if *forceProvider != "" {
providerName = *forceProvider
}
log.Printf("Generating MM output to '%s'", *outputPath)
log.Printf("Using %s version", *version)
log.Printf("Using %s provider", *forceProvider)
log.Printf("Building %s version", *version)
log.Printf("Building %s provider", providerName)

// Building compute takes a long time and can't be parallelized within the product
// so lets build it first
Expand Down
2 changes: 1 addition & 1 deletion mmv1/provider/terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func (t Terraform) CompileFileList(outputFolder string, files map[string]string,

func (t Terraform) addHashicorpCopyRightHeader(outputFolder, target string) {
if !expectedOutputFolder(outputFolder) {
log.Printf("Unexpected output folder (%s) detected"+
log.Printf("Unexpected output folder (%s) detected "+
"when deciding to add HashiCorp copyright headers.\n"+
"Watch out for unexpected changes to copied files", outputFolder)
}
Expand Down

0 comments on commit 4bee7ca

Please sign in to comment.