Skip to content

Commit

Permalink
bug(turbine): JS build and run were mixed up and caused an erroneous …
Browse files Browse the repository at this point in the history
…call during deploy (#441)
  • Loading branch information
janelletavares authored Sep 14, 2022
1 parent 71e2603 commit acf0566
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 2 additions & 9 deletions cmd/meroxa/turbine/javascript/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@ package turbinejs

import (
"context"

utils "github.com/meroxa/cli/cmd/meroxa/turbine"
)

// Build calls turbine-js to build an application.
// Build has nothing to do for turbine-js.
func (t *turbineJsCLI) Build(ctx context.Context, appName string, platform bool) (string, error) {
// TODO: Handle the requirement of https://github.com/meroxa/turbine-js.git being installed
// cd into the path first
cmd := utils.RunTurbineJS(ctx, "test", t.appPath)
stdOut, err := utils.RunCmdWithErrorDetection(ctx, cmd, t.logger)
t.logger.Info(ctx, stdOut)
return "", err
return "", nil
}

func (t *turbineJsCLI) CleanUpTempBuildLocation(ctx context.Context) error {
Expand Down
11 changes: 9 additions & 2 deletions cmd/meroxa/turbine/javascript/run.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package turbinejs

import "context"
import (
"context"

utils "github.com/meroxa/cli/cmd/meroxa/turbine"
)

// Run calls turbine-js to exercise the app.
func (t *turbineJsCLI) Run(ctx context.Context) (err error) {
_, err = t.Build(ctx, "", false)
cmd := utils.RunTurbineJS(ctx, "test", t.appPath)
stdOut, err := utils.RunCmdWithErrorDetection(ctx, cmd, t.logger)
t.logger.Info(ctx, stdOut)
return err
}

0 comments on commit acf0566

Please sign in to comment.