Class TagName

java.lang.Object
com.egoge.ai.atlas.plugin.TagName

public final class TagName extends Object
agentic { release { tagName } } : the git tag a released version is proved by (F1). The template has exactly one {version} placeholder, and renders to a valid git ref name. Only the exact rendered name counts as a match: "1.0.0" never stands in for "v1.0.0", and neither does a pre-release such as "v1.0.0-rc.1".
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default template, used unless agentic { release { tagName } } overrides it.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<com.egoge.ai.atlas.processor.release.ReleaseVersion>
    Whether tag is exactly this template rendered for a release version.
    static TagName
    parse(String template)
    Parses a tagName template.
    render(com.egoge.ai.atlas.processor.release.ReleaseVersion version)
    Renders the tag name for version.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_TEMPLATE

      public static final String DEFAULT_TEMPLATE
      The default template, used unless agentic { release { tagName } } overrides it.
      See Also:
  • Method Details

    • parse

      public static TagName parse(String template)
      Parses a tagName template.
      Parameters:
      template - the configured template, such as "v{version}"
      Returns:
      the parsed template
      Throws:
      org.gradle.api.GradleException - if it has no "{version}", more than one, or does not render a valid git ref name
    • render

      public String render(com.egoge.ai.atlas.processor.release.ReleaseVersion version)
      Renders the tag name for version.
      Parameters:
      version - the released version
      Returns:
      the tag name, such as "v1.4.0"
    • match

      public Optional<com.egoge.ai.atlas.processor.release.ReleaseVersion> match(String tag)
      Whether tag is exactly this template rendered for a release version.
      Parameters:
      tag - a tag name read from the repository
      Returns:
      the version it renders, or empty when tag does not match this template