From 1892b466a4ce0bc3742fdc596e5509977e304a5d Mon Sep 17 00:00:00 2001 From: Michail Merkushin Date: Thu, 23 Mar 2017 13:50:50 +0500 Subject: [PATCH] fix: REGEXP for version update, try 2 --- 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 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}"