thor-scmversion 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Thorfile CHANGED
@@ -15,15 +15,15 @@ class ThorSCMVersion < Thor
15
15
  desc "install", "Build and install latest to system gems"
16
16
  def install
17
17
  invoke "build", []
18
- system("gem install pkg/thor-scmversion-#{current_version}.gem}")
18
+ system("gem install pkg/thor-scmversion-#{current_version}.gem")
19
19
  end
20
20
 
21
21
  desc "release TYPE", "Bump version, make a build, and push to Rubygems"
22
22
  def release(type)
23
- # @current_version = nil
24
- # invoke "version:bump", [type]
23
+ @current_version = nil
24
+ invoke "version:bump", [type]
25
25
  invoke "build", []
26
- system("gem push pkg/thor-scmversion-#{current_version}.gem}")
26
+ system("gem push pkg/thor-scmversion-#{current_version}.gem")
27
27
  end
28
28
 
29
29
  private
@@ -12,7 +12,9 @@ module ThorSCMVersion
12
12
  def bump(type)
13
13
  current_version.bump! type
14
14
  begin
15
+ say "Creating and pushing tags", :yellow
15
16
  current_version.tag
17
+ say "Writing files: #{version_files.join(', ')}", :yellow
16
18
  write_version
17
19
  say "Tagged: #{current_version}", :green
18
20
  rescue => e
@@ -39,7 +41,6 @@ module ThorSCMVersion
39
41
  f.write ver
40
42
  end
41
43
  end
42
-
43
44
  ver
44
45
  end
45
46
 
@@ -36,14 +36,10 @@ module ThorSCMVersion
36
36
  def connection
37
37
  parse_and_set_p4_set
38
38
  check_environment
39
- #p4.connect
40
- #p4.run_login
41
39
  ShellUtils.sh "echo #{ENV["P4PASSWD"]} | p4 login"
42
40
  yield
43
41
  ensure
44
- #p4.run_logout
45
42
  ShellUtils.sh "p4 logout"
46
- #p4.disconnect
47
43
  end
48
44
  end
49
45
  end
@@ -65,16 +61,6 @@ module ThorSCMVersion
65
61
  `p4 edit -c default "#{self.version_file_path}"`
66
62
  File.open(self.version_file_path, 'w') { |f| f.write to_s }
67
63
  `p4 submit -d "#{description}"`
68
- #Perforce.connection do
69
- #new_changelist = p4.fetch_change
70
- #new_changelist._Description = "Bump version to #{to_s}."
71
- #saved_changelist = p4.save_change(new_changelist)
72
- #changelist_number = saved_changelist[0].match(/(\d+)/).to_s.strip
73
- #puts changelist_number
74
- #p4.run_edit("-c", changelist_number, self.version_file_path)
75
- #changelist = p4.fetch_change changelist_number
76
- #p4.run_submit changelist
77
- #end
78
64
  end
79
65
  end
80
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thor-scmversion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-06-25 00:00:00.000000000Z
14
+ date: 2012-07-20 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor
18
- requirement: &70274814343120 !ruby/object:Gem::Requirement
18
+ requirement: &70149391701840 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70274814343120
26
+ version_requirements: *70149391701840
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: webmock
29
- requirement: &70274814342700 !ruby/object:Gem::Requirement
29
+ requirement: &70149391688620 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *70274814342700
37
+ version_requirements: *70149391688620
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: geminabox
40
- requirement: &70274814342280 !ruby/object:Gem::Requirement
40
+ requirement: &70149391688100 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *70274814342280
48
+ version_requirements: *70149391688100
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: spork
51
- requirement: &70274814341860 !ruby/object:Gem::Requirement
51
+ requirement: &70149391687660 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *70274814341860
59
+ version_requirements: *70149391687660
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: simplecov
62
- requirement: &70274814341440 !ruby/object:Gem::Requirement
62
+ requirement: &70149391687020 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *70274814341440
70
+ version_requirements: *70149391687020
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: vcr
73
- requirement: &70274814341020 !ruby/object:Gem::Requirement
73
+ requirement: &70149391686400 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *70274814341020
81
+ version_requirements: *70149391686400
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: aruba
84
- requirement: &70274814340600 !ruby/object:Gem::Requirement
84
+ requirement: &70149391685780 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *70274814340600
92
+ version_requirements: *70149391685780
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: rspec
95
- requirement: &70274814340180 !ruby/object:Gem::Requirement
95
+ requirement: &70149391684860 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,7 +100,7 @@ dependencies:
100
100
  version: '0'
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *70274814340180
103
+ version_requirements: *70149391684860
104
104
  description: Thor tasks to manage a VERSION file based on SCM tags
105
105
  email:
106
106
  - ivey@gweezlebur.com
@@ -142,12 +142,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  - - ! '>='
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
+ segments:
146
+ - 0
147
+ hash: 183359978070304864
145
148
  required_rubygems_version: !ruby/object:Gem::Requirement
146
149
  none: false
147
150
  requirements:
148
151
  - - ! '>='
149
152
  - !ruby/object:Gem::Version
150
153
  version: '0'
154
+ segments:
155
+ - 0
156
+ hash: 183359978070304864
151
157
  requirements: []
152
158
  rubyforge_project:
153
159
  rubygems_version: 1.8.10
@@ -163,4 +169,3 @@ test_files:
163
169
  - features/support/env.rb
164
170
  - spec/lib/scm_version_spec.rb
165
171
  - spec/spec_helper.rb
166
- has_rdoc: