Skip to content

Commit

Permalink
chore: release v0.18.2 (#1747)
Browse files Browse the repository at this point in the history
fix(codegen): do not reset generated code
  • Loading branch information
ilgooz authored Oct 29, 2021
2 parents ae57d66 + 1f76d11 commit b8bd497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions starport/pkg/cosmosgen/generate_javascript.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ func (g *jsGenerator) generateModule(ctx context.Context, tsprotoPluginPath, app
return err
}

// reset destination dir.
if err := os.RemoveAll(out); err != nil {
return err
}
if err := os.MkdirAll(typesOut, 0766); err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions starport/services/chain/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package chain
import (
"context"
"fmt"
"os"
"path/filepath"

"github.com/tendermint/starport/starport/pkg/cosmosanalysis/module"
"github.com/tendermint/starport/starport/pkg/cosmosgen"
"github.com/tendermint/starport/starport/pkg/giturl"
"github.com/tendermint/starport/starport/pkg/localfs"
)

const (
Expand Down Expand Up @@ -119,7 +119,7 @@ func (c *Chain) Generate(
}

storeRootPath := filepath.Join(c.app.Path, vuexPath, "generated")
if err := localfs.MkdirAllReset(storeRootPath, 0766); err != nil {
if err := os.MkdirAll(storeRootPath, 0766); err != nil {
return err
}

Expand All @@ -143,7 +143,7 @@ func (c *Chain) Generate(
}

rootPath := filepath.Join(c.app.Path, dartPath, "generated")
if err := localfs.MkdirAllReset(rootPath, 0766); err != nil {
if err := os.MkdirAll(rootPath, 0766); err != nil {
return err
}

Expand Down

0 comments on commit b8bd497

Please sign in to comment.