tmp-gitversion 4.0.0.pre.tfs0001.1633
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/GitVersion.exe +0 -0
- data/bin/LibGit2Sharp.dll.config +4 -0
- data/bin/gitversion +4 -0
- data/bin/lib/linux/x86_64/libgit2-15e1193.so +0 -0
- data/bin/lib/osx/libgit2-15e1193.dylib +0 -0
- data/bin/lib/win32/x64/git2-15e1193.dll +0 -0
- data/bin/lib/win32/x64/git2-15e1193.pdb +0 -0
- data/bin/lib/win32/x86/git2-15e1193.dll +0 -0
- data/bin/lib/win32/x86/git2-15e1193.pdb +0 -0
- data/gitversion.gemspec +18 -0
- data/lib/git_version.rb +12 -0
- data/lib/git_version/parser.rb +76 -0
- metadata +58 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b99feff29d9dd809b468019e5d1c9da433a16d5a7250af9f9ea08ed97dcc4e45
|
4
|
+
data.tar.gz: f1a092ab2d867b750705eb69d0317e73ea42259f1a0ec12c8fb19e7486590d3d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3cdf05254df62c4c376dc42c02c5aba8d223830376da3e2403e0be971aa0742948e0aefd7224274626b8aa0b3929d720c5d3750f4d8b6035ec835328ec9a2ec1
|
7
|
+
data.tar.gz: df29cfc77ba64fa18d7bd03f00be138185b280d61b96bfbb3d1672c11c2d0051319a64e09bff741ccbac1ce43a1a0b9df7d9d1ca444e9b82c6c03217aa4fc75f
|
data/bin/GitVersion.exe
ADDED
Binary file
|
data/bin/gitversion
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/gitversion.gemspec
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.platform = Gem::Platform::RUBY
|
3
|
+
spec.name = 'tmp-gitversion'
|
4
|
+
spec.licenses = ['MIT']
|
5
|
+
spec.version = '4.0.0-tfs0001.1633'
|
6
|
+
spec.summary = 'Easy Semantic Versioning (http://semver.org) for projects using Git'
|
7
|
+
spec.description = <<-EOF
|
8
|
+
Versioning when using git, solved. GitVersion looks at your git history and works out the semantic version of the commit being built.
|
9
|
+
EOF
|
10
|
+
|
11
|
+
spec.authors = ['GitTools and Contributors']
|
12
|
+
spec.homepage = 'https://github.com/GitTools/GitVersion'
|
13
|
+
|
14
|
+
spec.files = Dir['bin/**/*', 'lib/**/*', '*.gemspec'].reject { |f| File.directory?(f) }
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }.reject { |f| f =~ /\.(exe|pdb|dll|so|dylib)$/}
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
end
|
data/lib/git_version.rb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'open3'
|
3
|
+
|
4
|
+
module GitVersion
|
5
|
+
class Parser
|
6
|
+
attr_reader :args
|
7
|
+
attr_accessor :gitversion_exe
|
8
|
+
|
9
|
+
def initialize(args = [])
|
10
|
+
@args = args
|
11
|
+
end
|
12
|
+
|
13
|
+
def method_missing(symbol, *args)
|
14
|
+
keys = [symbol.to_s, pascal_case(symbol.to_s)]
|
15
|
+
|
16
|
+
found_key = keys.find { |key| json.has_key?(key) }
|
17
|
+
return json[found_key] if found_key
|
18
|
+
|
19
|
+
super
|
20
|
+
end
|
21
|
+
|
22
|
+
def json
|
23
|
+
@json ||= run_gitversion
|
24
|
+
end
|
25
|
+
|
26
|
+
def gitversion_exe
|
27
|
+
@gitversion_exe ||= File.expand_path(File.join(File.dirname(__FILE__), '../../bin/GitVersion.exe'))
|
28
|
+
end
|
29
|
+
|
30
|
+
def inspect
|
31
|
+
unless @json
|
32
|
+
|
33
|
+
return <<EOF
|
34
|
+
#{to_s}
|
35
|
+
Will invoke #{cmd_string} when first used.
|
36
|
+
EOF
|
37
|
+
|
38
|
+
else
|
39
|
+
|
40
|
+
return <<EOF
|
41
|
+
#{to_s}
|
42
|
+
Invoked #{cmd_string} and parsed its output:
|
43
|
+
#{json.inspect}
|
44
|
+
EOF
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
def run_gitversion
|
51
|
+
stdout_and_stderr, status = Open3.capture2e(*cmd)
|
52
|
+
|
53
|
+
raise StandardError.new("Failed running #{cmd_string}, #{status}. We received the following output:\n#{stdout_and_stderr}") unless status.success?
|
54
|
+
|
55
|
+
JSON.parse(stdout_and_stderr)
|
56
|
+
end
|
57
|
+
|
58
|
+
def cmd
|
59
|
+
cmd = [gitversion_exe]
|
60
|
+
cmd << args
|
61
|
+
cmd.flatten.reject(&:nil?)
|
62
|
+
end
|
63
|
+
|
64
|
+
def cmd_string
|
65
|
+
cmd.join(' ')
|
66
|
+
end
|
67
|
+
|
68
|
+
def pascal_case(str)
|
69
|
+
str
|
70
|
+
.to_s
|
71
|
+
.split('_')
|
72
|
+
.inject([]) { |buffer, e| buffer.push(e.capitalize) }
|
73
|
+
.join
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
metadata
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tmp-gitversion
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 4.0.0.pre.tfs0001.1633
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- GitTools and Contributors
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: " Versioning when using git, solved. GitVersion looks at your git
|
14
|
+
history and works out the semantic version of the commit being built.\n"
|
15
|
+
email:
|
16
|
+
executables:
|
17
|
+
- LibGit2Sharp.dll.config
|
18
|
+
- gitversion
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- bin/GitVersion.exe
|
23
|
+
- bin/LibGit2Sharp.dll.config
|
24
|
+
- bin/gitversion
|
25
|
+
- bin/lib/linux/x86_64/libgit2-15e1193.so
|
26
|
+
- bin/lib/osx/libgit2-15e1193.dylib
|
27
|
+
- bin/lib/win32/x64/git2-15e1193.dll
|
28
|
+
- bin/lib/win32/x64/git2-15e1193.pdb
|
29
|
+
- bin/lib/win32/x86/git2-15e1193.dll
|
30
|
+
- bin/lib/win32/x86/git2-15e1193.pdb
|
31
|
+
- gitversion.gemspec
|
32
|
+
- lib/git_version.rb
|
33
|
+
- lib/git_version/parser.rb
|
34
|
+
homepage: https://github.com/GitTools/GitVersion
|
35
|
+
licenses:
|
36
|
+
- MIT
|
37
|
+
metadata: {}
|
38
|
+
post_install_message:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">"
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: 1.3.1
|
52
|
+
requirements: []
|
53
|
+
rubyforge_project:
|
54
|
+
rubygems_version: 2.7.7
|
55
|
+
signing_key:
|
56
|
+
specification_version: 4
|
57
|
+
summary: Easy Semantic Versioning (http://semver.org) for projects using Git
|
58
|
+
test_files: []
|