@@ -10,6 +10,7 @@ import (
1010 "strings"
1111
1212 . "github.com/function61/gokit/builtin"
13+ "github.com/function61/turbobob/pkg/bobfile"
1314 "github.com/function61/turbobob/pkg/dockertag"
1415 "github.com/function61/turbobob/pkg/versioncontrol"
1516)
@@ -24,21 +25,21 @@ func isDevContainerRunning(containerName string) bool {
2425 return strings .TrimRight (string (result ), "\n " ) == "true"
2526}
2627
27- func devContainerName (bobfile * Bobfile , builder BuilderSpec ) string {
28+ func devContainerName (bobfile * bobfile. Bobfile , builder bobfile. BuilderSpec ) string {
2829 return containerNameInternal ("dev" , bobfile , builder )
2930}
3031
31- func langServerContainerName (bobfile * Bobfile , builder BuilderSpec ) string {
32+ func langServerContainerName (bobfile * bobfile. Bobfile , builder bobfile. BuilderSpec ) string {
3233 return containerNameInternal ("langserver" , bobfile , builder )
3334}
3435
3536// do not use directly
36- func containerNameInternal (kind string , bobfile * Bobfile , builder BuilderSpec ) string {
37+ func containerNameInternal (kind string , bobfile * bobfile. Bobfile , builder bobfile. BuilderSpec ) string {
3738 return fmt .Sprintf ("tb%s-%s-%s" , kind , bobfile .ProjectName , builder .Name )
3839
3940}
4041
41- func builderImageName (bobfile * Bobfile , builder BuilderSpec ) string {
42+ func builderImageName (bobfile * bobfile. Bobfile , builder bobfile. BuilderSpec ) string {
4243 builderType , ref , err := parseBuilderUsesType (builder .Uses )
4344 if err != nil {
4445 panic (err )
@@ -54,7 +55,7 @@ func builderImageName(bobfile *Bobfile, builder BuilderSpec) string {
5455 }
5556}
5657
57- func buildBuilder (bobfile * Bobfile , builder * BuilderSpec ) error {
58+ func buildBuilder (bobfile * bobfile. Bobfile , builder * bobfile. BuilderSpec ) error {
5859 imageName := builderImageName (bobfile , * builder )
5960
6061 builderUsesType , dockerfilePath , err := parseBuilderUsesType (builder .Uses )
@@ -114,9 +115,9 @@ func buildBuilder(bobfile *Bobfile, builder *BuilderSpec) error {
114115func dockerRelayEnvVars (
115116 dockerArgs []string ,
116117 revisionId * versioncontrol.RevisionId ,
117- builder BuilderSpec ,
118+ builder bobfile. BuilderSpec ,
118119 envsAreRequired bool ,
119- osArches OsArchesSpec ,
120+ osArches bobfile. OsArchesSpec ,
120121 fastbuild bool ,
121122 debug bool ,
122123) ([]string , error ) {
@@ -166,7 +167,7 @@ func dockerRelayEnvVars(
166167 return dockerArgs , nil
167168}
168169
169- func loginToDockerRegistry (dockerImage DockerImageSpec , cache * dockerRegistryLoginCache ) error {
170+ func loginToDockerRegistry (dockerImage bobfile. DockerImageSpec , cache * dockerRegistryLoginCache ) error {
170171 credentialsObtainer := getDockerCredentialsObtainer (dockerImage )
171172 creds , err := credentialsObtainer .Obtain ()
172173 if err != nil {
@@ -179,7 +180,7 @@ func loginToDockerRegistry(dockerImage DockerImageSpec, cache *dockerRegistryLog
179180
180181 tagParsed := dockertag .Parse (dockerImage .Image )
181182 if tagParsed == nil {
182- return ErrUnableToParseDockerTag
183+ return bobfile . ErrUnableToParseDockerTag
183184 }
184185
185186 registryDefaulted := tagParsed .Registry
0 commit comments