mirror of
https://github.com/ko-build/ko.git
synced 2025-07-15 23:54:17 +02:00
add selector flag and logic (#46)
* add selector flag and logic * comments, cleanup * add readme note for selector flag * preserve comments, fix nits * readme nit
This commit is contained in:
committed by
jonjohnsonjr
parent
b7d1820e13
commit
0c205ab8e4
@ -33,6 +33,7 @@ func addCreate(topLevel *cobra.Command) {
|
||||
fo := &options.FilenameOptions{}
|
||||
ta := &options.TagsOptions{}
|
||||
do := &options.DebugOptions{}
|
||||
so := &options.SelectorOptions{}
|
||||
create := &cobra.Command{
|
||||
Use: "create -f FILENAME",
|
||||
Short: "Create the input files with image references resolved to built/pushed image digests.",
|
||||
@ -115,7 +116,7 @@ func addCreate(topLevel *cobra.Command) {
|
||||
stdin.Write([]byte("---\n"))
|
||||
}
|
||||
// Once primed kick things off.
|
||||
resolveFilesToWriter(builder, publisher, fo, stdin)
|
||||
resolveFilesToWriter(builder, publisher, fo, so, stdin)
|
||||
}()
|
||||
|
||||
// Run it.
|
||||
@ -129,6 +130,7 @@ func addCreate(topLevel *cobra.Command) {
|
||||
options.AddFileArg(create, fo)
|
||||
options.AddTagsArg(create, ta)
|
||||
options.AddDebugArg(create, do)
|
||||
options.AddSelectorArg(create, so)
|
||||
|
||||
// Collect the ko-specific apply flags before registering the kubectl global
|
||||
// flags so that we can ignore them when passing kubectl global flags through
|
||||
|
Reference in New Issue
Block a user