Fix revision for git tags
This commit is contained in:
parent
56b264e06d
commit
f0497d3164
|
@ -321,6 +321,9 @@ func (r *GitRepositoryReconciler) sync(ctx context.Context, repository sourcev1.
|
||||||
|
|
||||||
if revision == "" {
|
if revision == "" {
|
||||||
revision = fmt.Sprintf("%s/%s", branch, ref.Hash().String())
|
revision = fmt.Sprintf("%s/%s", branch, ref.Hash().String())
|
||||||
|
if repository.Spec.Reference.Tag != "" {
|
||||||
|
revision = fmt.Sprintf("%s/%s", repository.Spec.Reference.Tag, ref.Hash().String())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifact := r.Storage.ArtifactFor(repository.Kind, repository.ObjectMeta.GetObjectMeta(),
|
artifact := r.Storage.ArtifactFor(repository.Kind, repository.ObjectMeta.GetObjectMeta(),
|
||||||
|
|
Loading…
Reference in New Issue