Merge pull request #802 from thaJeztah/fix-yaml-generation

Fix docs YAML generation setting "kubernetes" for "swarm"
This commit is contained in:
Sebastiaan van Stijn 2018-01-11 19:56:36 +01:00 committed by GitHub
commit 41368a84bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ func GenYamlCustom(cmd *cobra.Command, w io.Writer) error {
cliDoc.Kubernetes = true
}
if _, ok := curr.Annotations["swarm"]; ok && !cliDoc.Swarm {
cliDoc.Kubernetes = true
cliDoc.Swarm = true
}
}
@ -208,7 +208,7 @@ func genFlagResult(flags *pflag.FlagSet) []cmdOption {
opt.Kubernetes = true
}
if _, ok := flag.Annotations["swarm"]; ok {
opt.Kubernetes = true
opt.Swarm = true
}
result = append(result, opt)