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: GitError, GitTagDuplicateError, 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
-
.versioner ⇒ #kind_of? ScmVersion
Figures out whether the repository is managed by git.
- .windows? ⇒ Boolean
Class Method Details
.versioner ⇒ #kind_of? ScmVersion
Figures out whether the repository is managed by git. If not, use p4.
7 8 9 10 11 12 13 |
# File 'lib/thor-scmversion/scm_version.rb', line 7 def versioner if(File.exist? (".git")) return GitVersion else return P4Version end end |
.windows? ⇒ Boolean
3 4 5 |
# File 'lib/thor-scmversion/p4_version.rb', line 3 def windows? RbConfig::CONFIG["arch"] =~ /cygwin|mswin|mingw|bccwin|wince|emx/ end |