feat(controller): intial build functions setup in go and service building
This commit is contained in:
17
controller/build_app.go
Normal file
17
controller/build_app.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// ---- Run npm build ----
|
||||
func runNpmBuild() error {
|
||||
cmd := exec.Command("npm", "run", "build")
|
||||
if os.Getenv("RUNNING_IN_DOCKER") == "true" {
|
||||
cmd.Dir = "/app"
|
||||
}
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
return cmd.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user