mrutkows 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_r133323787
 
 

 ##########
 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:
   @lzbj currently, we have 2 hardcoded filenames for manifest and for 
deployment files (i.e., manifest.yaml and .yml and deployment.yaml and .yml 
respectively (declared in "shared.go").  These names appear "lowercased". We 
need to find a way such that we can match any mixed base name such as 
"Manifest.yaml" or "manifest.YAML" etc.  I would be happy if you want to open 
this as a lower priority issue to fix later.
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to