Module: ThorSCMVersion

Defined in:
lib/thor-scmversion.rb,
lib/thor-scmversion/errors.rb,
lib/thor-scmversion/version.rb,
lib/thor-scmversion/p4_version.rb,
lib/thor-scmversion/prerelease.rb,
lib/thor-scmversion/git_version.rb,
lib/thor-scmversion/scm_version.rb,
lib/thor-scmversion/shell_utils.rb

Defined Under Namespace

Modules: Perforce Classes: GitVersion, InternalError, InvalidPrereleaseFormatError, MissingP4ConfigException, P4Version, Prerelease, SCMVersionError, ScmVersion, ShellUtils, TagFormatError, Tasks

Constant Summary collapse

VERSION =
IO.read(File.join(File.dirname(__FILE__), '..', '..', 'VERSION')) rescue "0.0.1"

Class Method Summary collapse

Class Method Details

.versioner#kind_of? ScmVersion

Figures out whether the repository is managed by git. If not, use p4.

Returns:



7
8
9
10
11
12
13
# File 'lib/thor-scmversion/scm_version.rb', line 7

def versioner
  if(File.directory?(".git"))
    return GitVersion
  else
    return P4Version
  end
end