Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated Makefile and mmv builder #12314

Merged
merged 6 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading