// UnsortedSemanticReleaseTags returns the tags in the release as a sortable array, but
// does not sort the array. If phases is specified only tags in the provided phases
// are returned.
UnsortedSemanticReleaseTags returns the tags in the release as a sortable array, but
does not sort the array. If phases is specified only tags in the provided phases
are returned.
// UnsortedSemanticReleaseTags returns the tags in the release as a sortable array but // does not sort the array . If phases is specified only tags in the provided phases // are returned .
func UnsortedSemanticReleaseTags(release *Release, phases ...string) SemanticVersions {
	is := release.Target
	sourceName := fmt.Sprintf("%s/%s", release.Source.Namespace, release.Source.Name)
	versions := make(SemanticVersions, 0, len(is.Spec.Tags))
	for i := range is.Spec.Tags {
		tag := &is.Spec.Tags[i]
		if tag.Annotations[ReleaseAnnotationSource] != sourceName {
			continue
		}
		if tag.Annotations[ReleaseAnnotationName] != release.Config.Name {
			continue
		}
		if len(phases) > 0 && !StringSliceContains(phases, tag.Annotations[ReleaseAnnotationPhase]) {
			continue
		}
		if version, err := semver.Parse(tag.Name); err == nil {
			versions = append(versions, SemanticVersion{Tag: tag, Version: &version})
		} else {
			versions = append(versions, SemanticVersion{Tag: tag})
		}
	}
	return versions
}
func UnsortedSemanticReleaseTags ( release * Release , phases ... string ) SemanticVersions { is := release . Target sourceName := fmt . Sprintf ( " " , release . Source . Namespace , release . Source . Name ) versions := make ( SemanticVersions , 0 , len ( is . Spec . Tags ) ) for i := range is . Spec . Tags { tag := & is . Spec . Tags [ i ] if tag . Annotations [ ReleaseAnnotationSource ] != sourceName { continue } if tag . Annotations [ ReleaseAnnotationName ] != release . Config . Name { continue } if len ( phases ) > 0 && ! StringSliceContains ( phases , tag . Annotations [ ReleaseAnnotationPhase ] ) { continue } if version , err := semver . Parse ( tag . Name ) ; err == nil { versions = append ( versions , SemanticVersion { Tag : tag , Version : & version } ) } else { versions = append ( versions , SemanticVersion { Tag : tag } ) } } return versions }
UnsortedSemanticReleaseTags returns the tags in the release as a sortable array, but
does not sort the array.
UnsortedSemanticReleaseTags returns the tags in the release as a sortable array but does not sort the array .
// if the name has changed, consider the tag abandoned (admin is responsible for cleaning it up)