Package 

Class GitVersionService


  • 
    public final class GitVersionService
    
                        

    Calculate the version from a Git Repository. The repository uses GitFlow for the development. The start parameter is the local source directory.

    • Constructor Detail

      • GitVersionService

        GitVersionService(File directory, VersionType versionType)
        creates the service from a directory
        Parameters:
        directory - local source directory
        versionType - default value com.intershop.release.version.VersionType.fourDigits.
      • GitVersionService

        GitVersionService(File directory)
        creates the service from a directory
        Parameters:
        directory - local source directory
    • Method Detail

      • getClient

         final Git getClient()

        Git client for the existing working copy.

      • getRepository

         final Repository getRepository()

        Repository for the existing working copy.

      • getSeparator

         final String getSeparator()

        Separator for prefix and branch name. Default value is /.

      • setSeparator

         final Unit setSeparator(String separator)

        Separator for prefix and branch name. Default value is /.

      • getShortened

         final Boolean getShortened()

        Version is shortened for branches and hotfixes with an hash for the string if shortened is true.

      • setShortened

         final Unit setShortened(Boolean shortened)

        Version is shortened for branches and hotfixes with an hash for the string if shortened is true.

      • getDefaultVersion

         final Version getDefaultVersion()

        Default version. Default value is Version.Builder(versionType).build().

      • setDefaultVersion

         final Unit setDefaultVersion(Version defaultVersion)

        Default version. Default value is Version.Builder(versionType).build().

      • getVersion

         final String getVersion()

        This is the calculated version of the Git repository.

      • getRevObjectFrom

         final RevCommit getRevObjectFrom(Version version)

        Calculates the commit for a specified version.

        Parameters:
        version - is the a version