Skip to content

Commit

Permalink
fix: REGEXP for version update
Browse files Browse the repository at this point in the history
  • Loading branch information
deniskorobicyn committed Mar 23, 2017
1 parent 85bf19e commit ef4f929
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.*/m, "VERSION = '#{version}'.freeze")
File.write(file, contents)
spawn "git add #{file}"
log "Version updated to #{version}"
Expand Down

0 comments on commit ef4f929

Please sign in to comment.