From ef4f929a443fa4c0211fe1c094bc56b5a0329889 Mon Sep 17 00:00:00 2001 From: Denis Korobicyn Date: Thu, 23 Mar 2017 12:47:03 +0500 Subject: [PATCH] fix: REGEXP for version update --- lib/apress/gems/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}"