Skip to content

Commit

Permalink
fix the module scaffold to find the module folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantani authored and Pantani committed Oct 5, 2023
1 parent bddf8e8 commit e2f0ba9
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ignite/templates/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func clientCliTxModify(replacer placeholder.Replacer, opts *Options) genny.RunFn

func moduleSimulationModify(replacer placeholder.Replacer, opts *Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module_simulation.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/simulation.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

keepertest "<%= modulePath %>/testutil/keeper"
"<%= modulePath %>/testutil/nullify"
"<%= modulePath %>/x/<%= moduleName %>"
"<%= modulePath %>/x/<%= moduleName %>/module"
"<%= modulePath %>/x/<%= moduleName %>/types"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/module/create/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewIBC(replacer placeholder.Replacer, opts *CreateOptions) (*genny.Generato

func genesisModify(replacer placeholder.Replacer, opts *CreateOptions) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions ignite/templates/typed/list/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ for _, elem := range gs.%[3]vList {

func genesisModuleModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down Expand Up @@ -154,7 +154,7 @@ genesis.%[2]vCount = k.Get%[2]vCount(ctx)

func genesisTestsModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis_test.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis_test.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/typed/list/simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func moduleSimulationModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module_simulation.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/simulation.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions ignite/templates/typed/map/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ for _, elem := range gs.%[3]vList {

func genesisModuleModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down Expand Up @@ -385,7 +385,7 @@ for _, elem := range genState.%[3]vList {

func genesisTestsModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis_test.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis_test.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/typed/map/simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func moduleSimulationModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module_simulation.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/simulation.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion ignite/templates/typed/singleton/simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func moduleSimulationModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module_simulation.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/simulation.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions ignite/templates/typed/singleton/singleton.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func genesisTypesModify(replacer placeholder.Replacer, opts *typed.Options) genn

func genesisTestsModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis_test.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis_test.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down Expand Up @@ -307,7 +307,7 @@ func genesisTypesTestsModify(replacer placeholder.Replacer, opts *typed.Options)

func genesisModuleModify(replacer placeholder.Replacer, opts *typed.Options) genny.RunFn {
return func(r *genny.Runner) error {
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "genesis.go")
path := filepath.Join(opts.AppPath, "x", opts.ModuleName, "module/genesis.go")
f, err := r.Disk.Find(path)
if err != nil {
return err
Expand Down

0 comments on commit e2f0ba9

Please sign in to comment.