-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(scaffolding): add --path
for all scaffold, generate and chain commands
#1518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pantani can you also cover this part? #1365 (comment)
to detect, we can recursively lookup for a go.mod file in parent directories. and to make sure this belongs to the chain, let's check if the go.mod file requires tendermint and cosmos-sdk repositories. then we can set the dir of where go.mod resides as the --path, otherwise we can return with an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
great, nice feature!! it's done |
…pp-path-flag # Conflicts: # starport/services/scaffolder/oracle.go # starport/services/scaffolder/packet.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid improvement! 🔥
…ignite#1518) * add appPath flag for all scaffold, generate and chain commands * use app path flag as a constant * fix the wrong proto path * add dynamic path for box templates * add aPath parameter to AddGenesisTest method * fix box walk path * fix new chain path * fix protoc generation * improva code readbility * fix import sort for run.go * add dynamic search for go module in the parent directories * fix TestParse method * check if the the cosmos-sdk and the tendermint packages are imported * print the relative scaffold paths * apply comment suggestions from PR * don't use Path structure to path the appPath var * Apply suggestions from code review * fix some relative paths and remove unused method context * move ValidateGoModule method * fix lint * fix appPath for scaffold wasm * remove global app path * fix merge conflicts * move ValidateGoMod method to cosmosanalysis package * fix missing path flag * remove unused error return * fix path for genesis types test modifiers * improve app path description and removed unused flag * change AppPath flag to Path * avoid generic path flag * remove gomodulepath import from the cosmosanalysis pkg * fix wrong app path * remove unecessary conversion to absPath * add integration test cases for custom app path * move relative path method to cmd * create ValidateApp extension method for Scaffolder object and remove newChain method * fix wrong method call * add test path with a folder inside the project * refactor(scaffolder): w/ --path (ignite#1568) Co-authored-by: İlker G. Öztürk <[email protected]>
closes #1365
What does this MR does?
Add the --path flag for all starport scaffolds, generate and chain commands.
How to test?