diff --git a/lib/apress/gems/cli.rb b/lib/apress/gems/cli.rb index 85b3da8..de39529 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(\.freeze)*/m, "VERSION = '#{version}'.freeze") File.write(file, contents) spawn "git add #{file}" log "Version updated to #{version}"