Skip to content

Commit

Permalink
Work around for using revision but no branch
Browse files Browse the repository at this point in the history
See fluxcd/source-controller#315.

Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
  • Loading branch information
squaremo committed Mar 22, 2021
1 parent 9454d8d commit aa97a97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assemblage/controllers/assemblage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func gitRepositorySpecFromSync(sync *fleetv1.Sync) (sourcev1.GitRepositorySpec,
if tag := srcSpec.Version.Tag; tag != "" {
ref.Tag = tag
} else if rev := srcSpec.Version.Revision; rev != "" {
ref.Branch = "main" // FIXME a hack to make it work with my repos, see https://github.com/fluxcd/source-controller/issues/315
ref.Commit = rev
} else {
return dstSpec, fmt.Errorf("neither tag nor revision given in git source spec")
Expand Down

0 comments on commit aa97a97

Please sign in to comment.