Skip to content

Commit dd0ced8

Browse files
wyardleyanoopkverma-google
authored andcommitted
chore: updated Makefile and mmv builder (GoogleCloudPlatform#12314)
1 parent 5fc7ae4 commit dd0ced8

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

GNUmakefile

+4-2
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ terraform build provider:
5959
make tpgtools
6060

6161
mmv1:
62+
# Chaining these with "&&" is critical so this will exit non-0 if the first
63+
# command fails, since we're not forcing bash and errexit / pipefail here.
6264
cd mmv1;\
6365
if [ "$(VERSION)" = "ga" ]; then \
64-
go run . --output $(OUTPUT_PATH) --version ga --no-docs $(mmv1_compile); \
65-
go run . --output $(OUTPUT_PATH) --version beta --no-code $(mmv1_compile); \
66+
go run . --output $(OUTPUT_PATH) --version ga --no-docs $(mmv1_compile) \
67+
&& go run . --output $(OUTPUT_PATH) --version beta --no-code $(mmv1_compile); \
6668
else \
6769
go run . --output $(OUTPUT_PATH) --version $(VERSION) $(mmv1_compile); \
6870
fi

mmv1/main.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,13 @@ func main() {
132132
}
133133

134134
startTime := time.Now()
135+
providerName := "default (terraform)"
136+
if *forceProvider != "" {
137+
providerName = *forceProvider
138+
}
135139
log.Printf("Generating MM output to '%s'", *outputPath)
136-
log.Printf("Using %s version", *version)
137-
log.Printf("Using %s provider", *forceProvider)
140+
log.Printf("Building %s version", *version)
141+
log.Printf("Building %s provider", providerName)
138142

139143
// Building compute takes a long time and can't be parallelized within the product
140144
// so lets build it first

mmv1/provider/terraform.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ func (t Terraform) CompileFileList(outputFolder string, files map[string]string,
499499

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

0 commit comments

Comments
 (0)