From 1123f3b1172de6eea66ef5f6154c26f4fc601b03 Mon Sep 17 00:00:00 2001 From: jano3 <jano@bob.co.za> Date: Wed, 13 Dec 2023 11:45:18 +0200 Subject: [PATCH] Use bootstrap as executable name for playground environment --- mage_helpers/build.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mage_helpers/build.go b/mage_helpers/build.go index 9d85d34..63f5cdd 100644 --- a/mage_helpers/build.go +++ b/mage_helpers/build.go @@ -44,8 +44,14 @@ func Build(dir string, module string, isDebug bool) error { handler := path.Base(fullPath) fmt.Println(fmt.Sprintf("Building %v", handler)) + outputFileName := handler + fmt.Println("Checking to use bootstrap") + if os.Getenv("ENVIRONMENT") == "playground" { + outputFileName = "bootstrap" + } + outputDir := fmt.Sprintf(currentDir+`/core/build/handlers/%v`, handler) - outputFile := fmt.Sprintf(`%v/%v`, outputDir, handler) + outputFile := fmt.Sprintf(`%v/%v`, outputDir, outputFileName) appPath := fmt.Sprintf(`%v/core/%v`, module, handler) err := BuildGolangApp(outputFile, appPath, module, isDebug) if err != nil { -- GitLab