gitvers 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gitvers/cli.rb +24 -4
- data/lib/gitvers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4df66e60655d175f306d1de36fd80652c215b262
|
4
|
+
data.tar.gz: 4513ca7e62195687722269825b28f754ddad1361
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f106ab9092835f1f22e91592ac2d87fccd41de479e87c4388c450d9ef3a50187e7ed158e8b6a57b99dac97f983a437113a44580c7c5e7695044fe383de9ed7bf
|
7
|
+
data.tar.gz: 4cc288eeff4c82f86bae5331e2ee0f343515085a1ef2970185dd272ad2758c70bbc3a4e9a0122b1e2c762ce9ee96e34ea8c3aad6bc0c1ae45a52e60fb51f01d6
|
data/lib/gitvers/cli.rb
CHANGED
@@ -19,9 +19,23 @@ module Gitvers
|
|
19
19
|
rep.tag(initial)
|
20
20
|
end
|
21
21
|
when :show
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
what = ARGV.shift
|
23
|
+
case what
|
24
|
+
when 'full'
|
25
|
+
puts rep.full_version
|
26
|
+
when 'short'
|
27
|
+
puts rep.short_version
|
28
|
+
when 'revision'
|
29
|
+
puts rep.revision_number
|
30
|
+
when 'shell'
|
31
|
+
puts "GITVERS_REVISION=#{rep.revision_number}"
|
32
|
+
puts "GITVERS_FULL=#{rep.full_version}"
|
33
|
+
puts "GITVERS_SHORT=#{rep.short_version}"
|
34
|
+
else
|
35
|
+
puts "Current version: #{rep.summary}\n\n"
|
36
|
+
puts "All versions:"
|
37
|
+
puts rep.versions.map {|l| " #{l}"}
|
38
|
+
end
|
25
39
|
else
|
26
40
|
usage
|
27
41
|
end
|
@@ -39,7 +53,13 @@ Commands:
|
|
39
53
|
init Create an initial git tag
|
40
54
|
bump <step> Bump the version, step can be major, minor or patch
|
41
55
|
bump <version> Bump the version to a specific destination version
|
42
|
-
show
|
56
|
+
show [<what>] Display the current version
|
57
|
+
'What' can be:
|
58
|
+
- full # x.y.z-commit
|
59
|
+
- short # x.y.z
|
60
|
+
- revision # revision
|
61
|
+
- shell # output GITVERS_<name> variables
|
62
|
+
|
43
63
|
|
44
64
|
Examples:
|
45
65
|
|
data/lib/gitvers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitvers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Goy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|