Skip to content

Commit

Permalink
Always remove Go binaries (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
janelletavares authored Apr 18, 2022
1 parent d7d3c90 commit d6ce5ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions cmd/meroxa/root/apps/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,15 @@ func (d *Deploy) prepareAppForDeployment(ctx context.Context) error {
return err
}

func (d *Deploy) rmBinary() {
if d.lang == GoLang {
err := os.Remove(filepath.Join(d.path, d.appName+"*"))
if err != nil {
fmt.Printf("warning: failed to clean up app at %s: %v\n", d.path, err)
}
}
}

func (d *Deploy) tearDownExistingResources(ctx context.Context) error {
app, _ := d.client.GetApplication(ctx, d.appName)

Expand Down Expand Up @@ -572,6 +581,7 @@ func (d *Deploy) Execute(ctx context.Context) error {
}

err = d.prepareAppForDeployment(ctx)
defer d.rmBinary()
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion utils/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ func extendedResourcesTable(resources []*meroxa.Resource, connectors map[string]
subTable += fmt.Sprintf("\t\t%5s: %s\n", "UUID", r.UUID)
subTable += fmt.Sprintf("\t\t%5s: %s\n", "Type", string(r.Type))
subTable += fmt.Sprintf("\t\t%5s: %s\n", "State", string(c.State))
subTable += fmt.Sprintf("\t\t%5s: %s", "As", string(c.Type))
subTable += fmt.Sprintf("\t\t%5s: %s\n", "As", string(c.Type))
}

return subTable
Expand Down

0 comments on commit d6ce5ea

Please sign in to comment.