diff --git a/lib/apress/gems/cli.rb b/lib/apress/gems/cli.rb index a51653d..85b3da8 100644 --- a/lib/apress/gems/cli.rb +++ b/lib/apress/gems/cli.rb @@ -124,7 +124,7 @@ def exist? def update_version Dir['lib/**/version.rb'].each do |file| contents = File.read(file) - contents.gsub!(/VERSION\s*=\s*(['"])(.*?)\1/m, "VERSION = '#{version}'.freeze") + contents.gsub!(/VERSION\s*=\s*(['"])(.*?)\1.*/m, "VERSION = '#{version}'.freeze") File.write(file, contents) spawn "git add #{file}" log "Version updated to #{version}"