Skip to content

Commit c9a26e1

Browse files
authored
Merge pull request #43 from OpenVoxProject/fix-version-bump
Fix bumping openbolt version
2 parents 2c9115d + c646f2c commit c9a26e1

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

rakelib/vox.rake

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,15 @@ namespace :vox do
88
unless Gem::Version.correct?(version)
99
abort "#{version} does not appear to be a valid version string in x.y.z format"
1010
end
11-
# Update lib/bolt/version.rb and openbolt.gemspec
11+
# Update lib/bolt/version.rb
1212
puts "Setting version to #{version}"
1313

1414
data = File.read('lib/bolt/version.rb')
15-
new_data = data.sub(/VERSION = '\d+\.\d+\.\d+(-\w+(\..*)?)?'/, "VERSION = '#{version}'")
15+
new_data = data.sub(/VERSION = '[^']+'/, "VERSION = '#{version}'")
1616
if data == new_data
1717
warn 'Failed to update version in lib/bolt/version.rb'
1818
else
1919
File.write('lib/bolt/version.rb', new_data)
2020
end
21-
22-
data = File.read('openbolt.gemspec')
23-
new_data = data.sub(/(spec.version *=) '\d+\.\d+\.\d+(-\w+(\.\w+)?)?'/, "\\1 '#{version}'")
24-
if data == new_data
25-
warn 'Failed to update version in openbolt.gemspec'
26-
else
27-
File.write('openbolt.gemspec', new_data)
28-
end
2921
end
3022
end

0 commit comments

Comments
 (0)