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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b11fe51ee7910637c42c35492733f57f273cd27e
4
- data.tar.gz: ade48819bb72019b79a96f83d9dd88083f93c86b
3
+ metadata.gz: 4df66e60655d175f306d1de36fd80652c215b262
4
+ data.tar.gz: 4513ca7e62195687722269825b28f754ddad1361
5
5
  SHA512:
6
- metadata.gz: 5d30b5254805c050264303834377b38ea4cf4efaf44c38487368bd1e8f1f800b02a815c2f7de3fe67da9372449c1fca0100c912e21e165670a8289a2804c747d
7
- data.tar.gz: f1b0dd950575f2b60810b4733b793972c68e9e334d1ece325527b13b2b7a47d47b5f9fdce6c1874513558f6c2193edcb14f884b674271470754d636b8ecd4f57
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
- puts "Current version: #{rep.summary}\n\n"
23
- puts "All versions:"
24
- puts rep.versions.map {|l| " #{l}"}
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 Display the current version
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
 
@@ -1,3 +1,3 @@
1
1
  module Gitvers
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
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.5
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-04-21 00:00:00.000000000 Z
11
+ date: 2014-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler