diff options
author | Matthew Draper <matthew@trebex.net> | 2017-08-14 01:06:26 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 01:06:26 +0930 |
commit | dbe1647b84716f6b4ce7e099fb310a55d6c55905 (patch) | |
tree | 45c79c831e87863e8733c93d7e0473fee6fcfff7 /tasks | |
parent | 788f46d4863a0f38ecec042864da291f2342ec74 (diff) | |
parent | d17264d93f4278319e60ee20c4e29dc54be343e4 (diff) | |
download | rails-dbe1647b84716f6b4ce7e099fb310a55d6c55905.tar.gz rails-dbe1647b84716f6b4ce7e099fb310a55d6c55905.tar.bz2 rails-dbe1647b84716f6b4ce7e099fb310a55d6c55905.zip |
Merge pull request #30230 from koic/use_frozen_string_literal
Use frozen string literal
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/release.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tasks/release.rb b/tasks/release.rb index 6ff37fb415..aa8ba44c1a 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + FRAMEWORKS = %w( activesupport activemodel activerecord actionview actionpack activejob actionmailer actioncable activestorage railties ) FRAMEWORK_NAMES = Hash.new { |h, k| k.split(/(?<=active|action)/).map(&:capitalize).join(" ") } @@ -72,9 +74,9 @@ npm_version = version.gsub(/\./).with_index { |s, i| i >= 2 ? "-" : s } task gem => %w(update_versions pkg) do cmd = "" - cmd << "cd #{framework} && " unless framework == "rails" - cmd << "bundle exec rake package && " unless framework == "rails" - cmd << "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/" + cmd += "cd #{framework} && " unless framework == "rails" + cmd += "bundle exec rake package && " unless framework == "rails" + cmd += "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/" sh cmd end @@ -104,7 +106,7 @@ namespace :changelog do current_contents = File.read(fname) header = "## Rails #{version} (#{Date.today.strftime('%B %d, %Y')}) ##\n\n" - header << "* No changes.\n\n\n" if current_contents =~ /\A##/ + header += "* No changes.\n\n\n" if current_contents =~ /\A##/ contents = header + current_contents File.open(fname, "wb") { |f| f.write contents } end |