// SortedRawReleaseTags returns the tags for the given release in order of their creation
// if they are in one of the provided phases. Use sortedReleaseTags if you are trying to get the
// most appropriate recent tag. Intended for use only within the release.
SortedRawReleaseTags returns the tags for the given release in order of their creation
if they are in one of the provided phases. Use sortedReleaseTags if you are trying to get the
most appropriate recent tag. Intended for use only within the release.
// SortedRawReleaseTags returns the tags for the given release in order of their creation // if they are in one of the provided phases . Use sortedReleaseTags if you are trying to get the // most appropriate recent tag . Intended for use only within the release .
func SortedRawReleaseTags(release *Release, phases ...string) []*imagev1.TagReference {
	var tags []*imagev1.TagReference
	for i := range release.Target.Spec.Tags {
		tag := &release.Target.Spec.Tags[i]
		if tag.Annotations[ReleaseAnnotationName] != release.Config.Name {
			continue
		}
		if tag.Annotations[ReleaseAnnotationSource] != fmt.Sprintf("%s/%s", release.Source.Namespace, release.Source.Name) {
			continue
		}
		if StringSliceContains(phases, tag.Annotations[ReleaseAnnotationPhase]) {
			tags = append(tags, tag)
		}
	}
	sort.Sort(TagReferencesByAge(tags))
	return tags
}
func SortedRawReleaseTags ( release * Release , phases ... string ) [ ] * imagev1 . TagReference { var tags [ ] * imagev1 . TagReference for i := range release . Target . Spec . Tags { tag := & release . Target . Spec . Tags [ i ] if tag . Annotations [ ReleaseAnnotationName ] != release . Config . Name { continue } if tag . Annotations [ ReleaseAnnotationSource ] != fmt . Sprintf ( " " , release . Source . Namespace , release . Source . Name ) { continue } if StringSliceContains ( phases , tag . Annotations [ ReleaseAnnotationPhase ] ) { tags = append ( tags , tag ) } } sort . Sort ( TagReferencesByAge ( tags ) ) return tags }
SortedRawReleaseTags returns the tags for the given release in order of their creation
if they are in one of the provided phases.
SortedRawReleaseTags returns the tags for the given release in order of their creation if they are in one of the provided phases .