Spike on clone + search & replace
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 module and eventually msg.
To use just make install then try the following command to clone the gaia repo as a starting point:
scaffold clone cosmos gaia <yourUserName> <yourDesiredRepoName>
This clones the cosmos/gaia repo into a tmp dir, removes the .git dir, replaces all instances of cosmos/gaia with yourUserName/yourDesiredRepoName then moves the dir into the cwd/<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.
- [ ] add flag for tag
- [ ] remove rename as requirement
- [ ] combine user and repo into a singe paramenter with "/" separator