Merge pull request #1794: fixes in cosmos-sdk-cli

Some fixes in cosmos-sdk-cli
This commit is contained in:
Rigel
2018-07-23 14:35:41 -04:00
committed by GitHub
2 changed files with 12 additions and 7 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ FEATURES
* Modules can test random combinations of their own operations
* Applications can integrate operations and invariants from modules together for an integrated simulation
* [baseapp] Initialize validator set on ResponseInitChain
* Added support for cosmos-sdk-cli tool under cosmos-sdk/cmd
* This allows SDK users to init a new project repository with a single command.
* [cosmos-sdk-cli] Added support for cosmos-sdk-cli tool under cosmos-sdk/cmd
* This allows SDK users to initialize a new project repository.
IMPROVEMENTS
* [baseapp] Allow any alphanumeric character in route
+10 -5
View File
@@ -44,9 +44,9 @@ var initCmd = &cobra.Command{
"basecoind", shortProjectName+"d",
"BasecoinApp", capitalizedProjectName+"App",
remoteBasecoinPath, remoteProjectPath,
"basecoin", shortProjectName)
setupBasecoinWorkspace(shortProjectName, remoteProjectPath)
return nil
"basecoin", shortProjectName,
"Basecoin", capitalizedProjectName)
return setupBasecoinWorkspace(shortProjectName, remoteProjectPath)
},
}
@@ -142,11 +142,16 @@ benchmark:
}
func setupBasecoinWorkspace(projectName string, remoteProjectPath string) {
func setupBasecoinWorkspace(projectName string, remoteProjectPath string) error {
projectPath := resolveProjectPath(remoteProjectPath)
fmt.Println("Configuring your project in " + projectPath)
// Check if the projectPath already exists or not
if _, err := os.Stat(projectPath); !os.IsNotExist(err) {
return fmt.Errorf("Unable to initialize the project. %s already exists", projectPath)
}
copyBasecoinTemplate(projectName, projectPath, remoteProjectPath)
createGopkg(projectPath)
createMakefile(projectPath)
fmt.Printf("\nInitialized a new project at %s.\nHappy hacking!\n", projectPath)
fmt.Printf("Initialized a new project at %s.\nHappy hacking!\n", projectPath)
return nil
}