aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb14
-rw-r--r--tasks/release_announcement_draft.erb2
2 files changed, 9 insertions, 7 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index b3bbbb0076..aa8ba44c1a 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -1,4 +1,6 @@
-FRAMEWORKS = %w( activesupport activemodel activerecord actionview actionpack activejob actionmailer actioncable railties )
+# 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(" ") }
root = File.expand_path("..", __dir__)
@@ -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
@@ -234,7 +236,7 @@ task :announce do
versions = ENV["VERSIONS"] ? ENV["VERSIONS"].split(",") : [ version ]
versions = versions.sort.map { |v| Announcement::Version.new(v) }
- raise "Only valid for patch releases" if versions.any?(&:major_or_security?)
+ raise "Only valid for patch releases" if versions.any?(&:major_or_security?)
if versions.any?(&:rc?)
require "date"
diff --git a/tasks/release_announcement_draft.erb b/tasks/release_announcement_draft.erb
index 65d121fd4b..3dbb8c053f 100644
--- a/tasks/release_announcement_draft.erb
+++ b/tasks/release_announcement_draft.erb
@@ -5,7 +5,7 @@ I am happy to announce that Rails <%= versions.join(" and ") %> <%= versions.siz
<% if future_date %>
If no regressions are found, expect the final release on <%= future_date.strftime("%A, %B %-d, %Y") %>.
If you find one, please open an [issue on GitHub](https://github.com/rails/rails/issues/new)
-<%= "and mention me (@github_user}) on it, " unless github_user.empty? %>so that we can fix it before the final release.
+<%= "and mention me (@#{github_user}) on it, " unless github_user.empty? %>so that we can fix it before the final release.
<% end %>
<% versions.each do |version| %>