This repository was archived by the owner on Oct 15, 2020. It is now read-only.
Spike on clone + search & replace #32
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a spike on the search and replace version of the scaffold command. Since the tutorial command is essentially cloning the relevant code and replacing the package name with the current users, i wanted to try doing it with search and replace instead of templates. This makes it possible to clone any repo, not just the tutorials, and use it as a starting point to then use other scaffold commands like
moduleand eventuallymsg.To use just
make installthen try the following command to clone the gaia repo as a starting point:This clones the cosmos/gaia repo into a tmp dir, removes the .git dir, replaces all instances of
cosmos/gaiawithyourUserName/yourDesiredRepoNamethen moves the dir into thecwd/<yourDesiredRepoName>Pretty simple / stupid and will need to make a custom version to handle the nameservice and hellochain examples since they are in the same repo nested below the root. But if we want to limit the template use to more robust module and msg creation we can simplify the clone command and use it with any sdk chain as a starting point. This also means we don't need to use templates as sources of truth, which can get messy since we can't actually compile them as templates.