Skip to content

Commit c646f2c

Browse files
committed
Fix bumping openbolt version
The gemspec seems to have been using the version from Bolt::VERSION since a long time, no need to update it when releasing a new version (probably some copy-pasta). Be more tolerant on what can be found in the version, as we incorrectly released 5.0.0.rc1 instead of 5.0.0-rc1. The version string is not expected to contain `'` char, so it is probably enough to capture what is in the quotes.
1 parent 2c9115d commit c646f2c

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)