You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/16 01:57:48 UTC

[GitHub] lzbj commented on a change in pull request #310: Support both manifest.yaml and manifest.yml

lzbj commented on a change in pull request #310: Support both manifest.yaml and manifest.yml
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/310#discussion_r133344298
 
 

 ##########
 File path: cmd/root.go
 ##########
 @@ -144,3 +138,134 @@ func initConfig() {
 		fmt.Println("Using config file:", viper.ConfigFileUsed())
 	}
 }
+
+
+func Deploy() error {
+
+	whisk.SetVerbose(utils.Flags.Verbose)
+
+	projectPath, err := filepath.Abs(utils.Flags.ProjectPath)
+	utils.Check(err)
+
+	if utils.Flags.ManifestPath == "" {
+		if _, err := os.Stat(path.Join(projectPath, "manifest.yaml")); err == nil {
+			utils.Flags.ManifestPath = path.Join(projectPath, deployers.ManifestFileNameYaml)
+		} else if _, err := os.Stat(path.Join(projectPath, "manifest.yml")); err == nil {
+			utils.Flags.ManifestPath = path.Join(projectPath, deployers.ManifestFileNameYml)
+		}
+	}
+
+	if utils.Flags.DeploymentPath == "" {
+		if _, err := os.Stat(path.Join(projectPath, "deployment.yaml")); err == nil {
 
 Review comment:
   Agree, I will open a issue for it.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services