with main.go path
This commit is contained in:
parent
c4ca5f25a0
commit
0838bc5a56
@ -11,6 +11,7 @@ import (
|
|||||||
func Build() *cobra.Command {
|
func Build() *cobra.Command {
|
||||||
var (
|
var (
|
||||||
imageTag string
|
imageTag string
|
||||||
|
mainGoPath string
|
||||||
)
|
)
|
||||||
|
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
@ -30,12 +31,14 @@ func Build() *cobra.Command {
|
|||||||
}
|
}
|
||||||
defer client.CleanUp()
|
defer client.CleanUp()
|
||||||
|
|
||||||
return tasks.Build(client, imageTag, "main.go")
|
return tasks.Build(client, imageTag, mainGoPath)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.PersistentFlags().StringVar(&imageTag, "image-tag", "", "the url for which to tag the docker image, defaults to private url, with repo as image name")
|
cmd.PersistentFlags().StringVar(&imageTag, "image-tag", "", "the url for which to tag the docker image, defaults to private url, with repo as image name")
|
||||||
cmd.MarkPersistentFlagRequired("image-tag")
|
cmd.MarkPersistentFlagRequired("image-tag")
|
||||||
|
|
||||||
|
cmd.PersistentFlags().StringVar(&mainGoPath, "main-path", "main.go", "main.go path")
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user