--spec flags for env and trigger creates (#607)

This commit is contained in:
Soam Vasani
2018-04-06 09:00:01 -07:00
committed by GitHub
parent 8014c83b02
commit 95a50dbbd6
7 changed files with 72 additions and 10 deletions
+8
View File
@@ -109,6 +109,14 @@ func htCreate(c *cli.Context) error {
},
}
// if we're writing a spec, don't call the API
if c.Bool("spec") {
specFile := fmt.Sprintf("route-%v.yaml", triggerName)
err := specSave(*ht, specFile)
checkErr(err, "create HTTP trigger spec")
return nil
}
_, err := client.HTTPTriggerCreate(ht)
checkErr(err, "create HTTP trigger")