Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Conversation

@okwme
Copy link
Contributor

@okwme okwme commented Dec 13, 2019

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.

@okwme
Copy link
Contributor Author

okwme commented Dec 16, 2019

  • add flag for tag
  • remove rename as requirement
  • combine user and repo into a singe paramenter with "/" separator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants