Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
janelletavares committed Aug 30, 2022
1 parent e0c03f7 commit 17351ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions cmd/meroxa/root/apps/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func (d *Deploy) buildApp(ctx context.Context) error {
}
d.logger.StopSpinnerWithStatus("Application built", log.Successful)
}
return nil
return err
}

// getAppImage will check what type of build needs to perform and ultimately will return the image name to use
Expand Down Expand Up @@ -490,8 +490,6 @@ func (d *Deploy) validateLanguage() error {
func (d *Deploy) validateAppJSON(ctx context.Context) error {
var err error

// d.logger.Info(ctx, "Validating your app.json...") @TODO suspect

// validateLocalDeploymentConfig will look for DockerHub credentials to determine whether it's a local deployment or not.
if err = d.validateLocalDeploymentConfig(); err != nil {
return err
Expand Down Expand Up @@ -589,8 +587,6 @@ func (d *Deploy) checkResourceAvailability(ctx context.Context) error {
}

func (d *Deploy) prepareDeployment(ctx context.Context) error {
// d.logger.Infof(ctx, "Deploying application %q...", d.appName) @TODO suspect

// After this point, CLI will package it up and will build it
err := d.buildApp(ctx)
if err != nil {
Expand Down Expand Up @@ -636,7 +632,6 @@ func (d *Deploy) validateSpecVersionDeployment() error {

// validateConfig will validate wether there are uncommitted changes or it's deploying from an accepted branch.
func (d *Deploy) validateGitConfig(ctx context.Context) error {
//d.logger.Info(ctx, "Checking for uncommitted changes...")
err := turbineCLI.GitChecks(ctx, d.logger, d.path)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions cmd/meroxa/turbine/golang/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ func BuildBinary(ctx context.Context, l log.Logger, appPath, appName string, pla
l.StopSpinnerWithStatus(string(stdout), log.Failed)
return fmt.Errorf("build failed")
}
return buildForCrossCompile(ctx, l, appPath, appName)
return buildForCrossCompile(l, appPath, appName)
}

func buildForCrossCompile(ctx context.Context, l log.Logger, appPath, appName string) error {
func buildForCrossCompile(l log.Logger, appPath, appName string) error {
cmd := exec.Command("go", "build", "--tags", "platform", "-o", appName+".cross", "./...") //nolint:gosec
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, "CGO_ENABLED=0", "GOOS=linux", "GOARCH=amd64")
Expand Down

0 comments on commit 17351ac

Please sign in to comment.