Skip to content

Commit

Permalink
Merge pull request #16 from bibendi/master
Browse files Browse the repository at this point in the history
fix: REGEXP for version update, try 2
  • Loading branch information
bibendi authored Mar 23, 2017
2 parents d226b5d + 1892b46 commit 69bb5c7
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 69bb5c7

Please sign in to comment.