lib/autowow/features/gem.rb in autowow-0.11.0 vs lib/autowow/features/gem.rb in autowow-0.11.1

- old
+ new

@@ -17,11 +17,12 @@ logger.error("Not on master.") and return unless start_branch.eql?("master") pretty.run(pull) version = nil if version_bump - version = pretty_with_output.run(bump(version_bump)).out.clean_lines[1].split(" ").last + version = pretty_with_output.run(bump(version_bump)).out.clean_lines + .select { |line| line.match(/Bumping/) }.split(" ").last bump_readme_version_information(version) pretty.run(add(["README.md", "*version.rb"])) pretty.run(commit("Bumps version to v#{version}")) end @@ -79,11 +80,11 @@ HEREDOC else version_information.gsub(/[0-9]\.[0-9]\.[0-9]/, version) end - text.gsub!(version_information, new_version_information) + text.gsub!(version_information, new_version_information.chomp) File.write(readme, text) end def change_readme_version_information_to_development(version) readme = File.new("README.md") @@ -99,10 +100,10 @@ <!--- Version informartion --> *You are viewing the README of the development version. You can find the README of the latest release (v#{version}) [here](#{releases_link}/tag/v#{version}).* <!--- Version informartion end --> HEREDOC - text.gsub!(version_information, new_version_information) + text.gsub!(version_information, new_version_information.chomp) File.write(readme, text) true end def contains_version_information?(text)