Skip to content

Commit

Permalink
fix: REGEXP for version update, try 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bibendi committed Mar 23, 2017
1 parent 9a20e3a commit 1892b46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/apress/gems/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 1892b46

Please sign in to comment.