@@ -27,7 +27,7 @@ type BuildContext struct {
2727 BuilderNameFilter string
2828 ENVsAreRequired bool
2929 VersionControl versioncontrol.Interface
30- RevisionId * versioncontrol.RevisionId
30+ RevisionID * versioncontrol.RevisionID
3131 Debug bool // enables additional debugging or verbose logging
3232 FastBuild bool // skip all non-essential steps (linting, testing etc.) to build faster
3333 RepositoryURL string // human-visitable URL, like "https://github.com/function61/turbobob"
@@ -97,7 +97,7 @@ func runBuilder(builder bobfile.BuilderSpec, buildCtx *BuildContext, opDesc stri
9797 // inserts ["--env", "FOO"] pairs for each PassEnvs
9898 buildArgs , errEnv := dockerRelayEnvVars (
9999 buildArgs ,
100- buildCtx .RevisionId ,
100+ buildCtx .RevisionID ,
101101 builder ,
102102 buildCtx .ENVsAreRequired ,
103103 archesToBuildFor ,
@@ -149,7 +149,7 @@ func buildAndPushOneDockerImage(dockerImage bobfile.DockerImageSpec, buildCtx *B
149149 }
150150
151151 tagWithoutVersion := dockerImage .Image
152- tag := tagWithoutVersion + ":" + buildCtx .RevisionId . FriendlyRevisionId
152+ tag := tagWithoutVersion + ":" + buildCtx .RevisionID . FriendlyRevisionID
153153 tagLatest := tagWithoutVersion + ":latest"
154154 dockerfilePath := dockerImage .DockerfilePath
155155
@@ -179,8 +179,8 @@ func buildAndPushOneDockerImage(dockerImage bobfile.DockerImageSpec, buildCtx *B
179179
180180 annotate (ociv1 .AnnotationTitle , buildCtx .Bobfile .ProjectName )
181181 annotate (ociv1 .AnnotationCreated , time .Now ().UTC ().Format (time .RFC3339 ))
182- annotate (ociv1 .AnnotationRevision , buildCtx .RevisionId . RevisionId )
183- annotate (ociv1 .AnnotationVersion , buildCtx .RevisionId . FriendlyRevisionId )
182+ annotate (ociv1 .AnnotationRevision , buildCtx .RevisionID . RevisionID )
183+ annotate (ociv1 .AnnotationVersion , buildCtx .RevisionID . FriendlyRevisionID )
184184 annotate (ociv1 .AnnotationDescription , buildCtx .Bobfile .Meta .Description )
185185
186186 // "URL to get source code for building the image"
@@ -241,6 +241,7 @@ func buildAndPushOneDockerImage(dockerImage bobfile.DockerImageSpec, buildCtx *B
241241 args = append (args , "--push" )
242242 }
243243
244+ //nolint:gosec // ok
244245 if err := passthroughStdoutAndStderr (exec .Command (args [0 ], args [1 :]... )).Run (); err != nil {
245246 return withErr (err )
246247 }
@@ -296,9 +297,9 @@ func cloneToWorkdir(buildCtx *BuildContext) error {
296297 return err
297298 }
298299
299- printHeading (fmt .Sprintf ("Updating to %s" , buildCtx .RevisionId . RevisionId ))
300+ printHeading (fmt .Sprintf ("Updating to %s" , buildCtx .RevisionID . RevisionID ))
300301
301- if err := workspaceRepo .Update (buildCtx .RevisionId . RevisionId ); err != nil {
302+ if err := workspaceRepo .Update (buildCtx .RevisionID . RevisionID ); err != nil {
302303 return err
303304 }
304305
@@ -330,8 +331,6 @@ func build(buildCtx *BuildContext) (*buildOutput, error) {
330331 // to include modification check for the Dockerfile and all of its build context, so we're just
331332 // best off calling Docker build because it is the best at detecting cache invalidation.
332333 for _ , builder := range buildCtx .Bobfile .Builders {
333- builder := builder // pin
334-
335334 if buildCtx .BuilderNameFilter != "" && builder .Name != buildCtx .BuilderNameFilter {
336335 continue
337336 }
@@ -440,7 +439,7 @@ func constructBuildContext(
440439 return nil , errVcDetermine
441440 }
442441
443- metadata , err := versioncontrol .CurrentRevisionId (versionControl , onlyCommitted )
442+ metadata , err := versioncontrol .CurrentRevisionID (versionControl , onlyCommitted )
444443 if err != nil {
445444 return nil , err
446445 }
@@ -456,7 +455,7 @@ func constructBuildContext(
456455 buildCtx := & BuildContext {
457456 Bobfile : bobfile ,
458457 PublishArtefacts : publishArtefacts ,
459- RevisionId : metadata ,
458+ RevisionID : metadata ,
460459 OriginDir : repoOriginDir ,
461460 WorkspaceDir : workspaceDir ,
462461 CloningStepNeeded : cloningStepNeeded ,
0 commit comments