Commit Graph

77 Commits

Author SHA1 Message Date
Rafael Mendonça França
be2473b2ef
Fix release task 2019-11-27 12:24:31 -03:00
Rafael Mendonça França
c9fe12fe8e
Fix announce script 2019-03-22 00:05:10 -04:00
Rafael Mendonça França
7f69ef7aea
Fix release template 2019-03-21 23:49:12 -04:00
Ryuta Kamizono
7ebfb319ff Enable Lint/ErbNewArguments cop to avoid the deprecated arguments warning
Related 5754a29a974d31cab2b4392716b9825a3d910a69.

And follows Ruby standard library style https://github.com/ruby/ruby/commit/3406c5d.
2019-02-01 14:20:11 +09:00
George Claghorn
c1e949e9e6 Prefer ImageProcessing's resize_to_limit macro over resize_to_fit
Don't upsize images smaller than the specified dimensions.
2019-01-24 11:46:42 -05:00
Rafael Mendonça França
3c6cfdf7ad
Change release_sumary task to work in first releases of the series 2019-01-18 16:35:09 -05:00
Rafael Mendonça França
ea83132e0e
Fix the user show page in the verify task 2019-01-18 15:39:39 -05:00
Kasper Timm Hansen
a08827a90b
Exercise Active Storage and Action Text in verification app.
Allows the releaser to verify that:

- A rich text description can be edited and shown *richly*.
- An image/PDF can be uploaded and generate a variant that's shown.

Also moves the generated app to a tmp directory for less cleanup need.
2019-01-15 20:21:32 +01:00
Kasper Timm Hansen
a64d7b470a
Install Action Mailbox and Action Text when verifying release. 2019-01-15 17:18:52 +01:00
Kasper Timm Hansen
842bc43f7f
The frameworks list is order dependent.
Ref: d507f332a9
2019-01-08 21:45:38 +01:00
Kevin Solorio
ce90ded4ca add new frameworks to tasks/release.rb
The Frameworks collection was missing actiontext and actionmailbox,
this would mean they are skipped when running any tasks that
iterated through this collection

changes include

Breaking up frameworks declaration into multiple lines and put
them in order. This should make adding to the list easier and
if you need to scan it, they will be in order you would expect

Add `package` task to both actiontext and actionmailbox
2019-01-08 10:36:33 -08:00
Rafael Mendonça França
0421eecf13
Fix announcement draft formatting [ci skip] 2018-12-04 13:41:49 -05:00
Rafael Mendonça França
b2465a0cc9
Add release link to the announcement [ci skip] 2018-12-04 13:41:43 -05:00
Rafael Mendonça França
e91bf5966e
Improve the task to generate the release summary
Now it accepts the base release to be compared with.

[ci skip]
2018-12-04 13:41:36 -05:00
bogdanvlviv
ea37ccddba
Fix rubocop offenses
- Layout/TrailingWhitespace

```
actionpack/lib/action_controller/metal/request_forgery_protection.rb:49:4:
C: Layout/TrailingWhitespace: Trailing whitespace detected.
  #
   ^
```

Related to c3787494eda

- Performance/StartWith

```
tasks/release.rb:108:44: C: Performance/StartWith:
Use String#start_with? instead of a regex match anchored to the beginning of the string.
      header += "*   No changes.\n\n\n" if current_contents =~ /\A##/
```
2018-08-15 08:34:31 +03:00
Bart de Water
eb5fea40a4 Enable Start/EndWith and RegexpMatch cops
In cases where the MatchData object is not used, this provides a speed-up:
https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
2018-07-28 17:37:17 -04:00
Xavier Noria
be9a32b65f prefer File.write for bulk writes
I saw these ones while working on #32362.

File.write was introduced in Ruby 1.9.3 and it is the most concise way
to perform bulk writes (as File.read is for bulk reading).

The existing flags enabled binmode, but we are dumping text here.
The portable way to dump text is text mode. The only difference is
newlines, and portable code should in particular emit portable newlines.

Please note the hard-coded \ns are still correct. In languages with C
semantics for newlines like Ruby, Python, Perl, and others, "\n" is a
portable newline. Both when writing and when reading. On Windows, the
I/O layer is responsible for prepending a CR before each LF on writing,
and removing CRs followed by LFs on reading. On Unix, binmode is a
no-op.
2018-05-05 19:38:38 +02:00
Koichi ITO
e8be4f0891 Deprecate safe_level of ERB.new in Ruby 2.6
### Summary

In a Rails application using Ruby 2.6.0-dev, when running `bin/rails g migration`
with `RUBYOPT=-w`, an ERB deprecation warnings will be displayed.

```console
% ruby -v
ruby 2.6.0dev (2018-03-03 trunk 62644) [x86_64-darwin17]
% bin/rails -v
Rails 6.0.0.alpha
% RUBYOPT=-w bin/rails g migration create_foos

(snip)

/Users/koic/src/github.com/rails/rails/railties/lib/rails/generators/migration.rb:66:
warning: Passing safe_level with the 2nd argument of ERB.new is
deprecated. Do not use it, and specify other arguments as keyword
arguments.
/Users/koic/src/github.com/rails/rails/railties/lib/rails/generators/migration.rb:66:
warning: Passing trim_mode with the 3rd argument of ERB.new is
deprecated. Use keyword argument like ERB.new(str, trim_mode: ...)
instead.
/Users/koic/src/github.com/rails/rails/railties/lib/rails/generators/migration.rb:66:
warning: Passing eoutvar with the 4th argument of ERB.new is
deprecated. Use keyword argument like ERB.new(str, eoutvar: ...)
instead.
      create    db/migrate/20180304002144_create_foos.rb
```

This PR suppresses the above deprecation warnings in Ruby 2.6.0-dev.

This warning is due to the interface of `ERB.new` will change from Ruby 2.6.

> Add :trim_mode and :eoutvar keyword arguments to ERB.new.
> Now non-keyword arguments other than first one are softly deprecated
> and will be removed when Ruby 2.5 becomes EOL. [Feature #14256]

2311087b68/NEWS (stdlib-updates-outstanding-ones-only)

The following addresses are related Ruby's commit.
https://github.com/ruby/ruby/commit/cc777d0

Also this PR will change `ERB.new` used in `tasks/release.rb`.

### Other Information

This PR uses `ERB.version` to switch `ERB.new` interface. Because Rails 6
supports multiple Ruby versions (Ruby 2.4.1 or higher), it need to
use the appropriate interface.

Using `ERB.version` instead of `RUBY_VERSON` is based on the following patch.
https://github.com/ruby/ruby/pull/1826

This patch is built into Ruby.
40db89c093
2018-03-05 18:49:45 +09:00
bogdanvlviv
9045875167
Remove unused variable gem_version from tasks/release.rb 2017-09-24 22:53:10 +03:00
Koichi ITO
ef2016f888 Use frozen string literal in tasks/ 2017-08-13 22:04:42 +09:00
David Heinemeier Hansson
5528406603 Merge pull request #30020 from rails/active-storage-import
Add Active Storage to Rails
2017-08-04 18:05:13 -05:00
Claudio B
12d944f765 Add Active Storage to README and release (#30065)
Before we forget...
2017-08-04 17:55:24 -05:00
Rafael Mendonça França
f7d0bd657f Fix all rubocop violations 2017-08-03 17:45:40 -04:00
Kasper Timm Hansen
3636d1f479
Fix github user output.
[ Orhan Toy & Kasper Timm Hansen ]
2017-07-30 16:09:36 +02:00
Kasper Timm Hansen
6f9b01c056
Use exact Rails version when verifying. 2017-07-25 22:00:07 +02:00
Kasper Timm Hansen
973c3211c6
Support multiple versions in release announcement.
So releasing 5.1 and 5.0 together won't require manual copy
and paste.
2017-07-22 21:17:25 +02:00
Kasper Timm Hansen
1e7acf844b
Add task to verify a release.
Basically revises the release flow to:

* Update the version in RAILS_VERSION + rake changelog:header
* Run rake all:verify (click around in the booted app)
* If that checks out, run rake release.
2017-07-22 21:17:25 +02:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn

Related to 5b8738c2df003a96f0e490c43559747618d10f5f
2017-05-23 00:53:51 +03:00
Rafael Mendonça França
fee4257f8d
Fix the blog post template header 2017-03-20 14:08:09 -04:00
Rafael Mendonça França
14ab460f8e
Use shasum 256 on the release 2017-02-24 20:02:37 -05:00
Matthew Draper
71df60e921
Rearrange npm release process again
Make prep_release idempotent, including the npm bump.
2017-02-23 15:14:20 -05:00
Matthew Draper
d7c8d34cc4
Add a task to build a draft of the release announcement 2017-02-23 15:06:34 -05:00
Rafael Mendonça França
d9d28d2437
Do not override the global variable
This will make the version of the next gems to change
2017-02-23 15:03:34 -05:00
Xavier Noria
60b67d76dc modernizes hash syntax in the rest of the project 2016-08-06 19:40:54 +02:00
Xavier Noria
78d3f84955 applies new string literal convention in tasks
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:22:32 +02:00
eileencodes
297e262035 Fix release task now that NPM is part of the build
Note: this commit looks super weird becuase git. I'm moving the entire
NPM section to the part where we actually push the gems/npm package for
the reasons below. That's not how the git diff looks though.

When we release Rails we run `rake prep_release` which calls
`update_versions`. This was updating the NPM version as well. But when we
would later run `rake install` to test the installed gem
`update_versions` gets called again which causes the install to fail
because NPM sees the version is the same as the last run and refuses to
continue. If you forget to stash this will then cause the push to
RubyGems to fail because `update_versions` is called again and then NPM
will not continue because it thinks the version hasn't been changed even
though it has.

The correct solution would be to not update the NPM verion if it matches
the version already in the file but after an hour I could not find a
simple way to use NPM to read the current version. Honestly that's not
the best way to do it either because say you forget to update something
else and then the script thinks it's already been updated.

With that in mind I think the best solution is to not update the NPM
version until right before we are going to push to NPM because then that
won't cause the push to RubyGems to fail.
2016-07-01 10:58:06 -04:00
Javan Makhmali
d12209cad2 Remove package:clean task
Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task.
2016-05-24 13:11:28 -04:00
Jon Moss
548c1d6e8b
Publish Action Cable to NPM when we release.
Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-05-11 19:36:27 -07:00
Rafael Mendonça França
db93aa16c4 Sign the tags when releasing 2016-05-06 16:24:41 -05:00
eileencodes
ba907d6caa Fix release script to allow pre release gems
This addition of `--pre` fixes the issue we were seeing when installing
a local copy of a pre-release rails version.
2016-04-27 15:48:47 -05:00
Matthew Draper
d6f2000a67 Wrangle the asset build into something that sounds more general 2016-02-01 05:03:03 +10:30
Jon Moss
cb040aa0e5 Add Action Cable asset building as release step 2016-01-30 20:51:18 -05:00
Aaron Patterson
23c36725a0 fix version update task to deal with .beta1.1 2016-01-25 10:22:03 -08:00
Rafael Mendonça França
7c4080aac4 Add task to test the release preparation 2015-12-18 14:56:26 -02:00
Arun Agrawal
aeceb5d188 Add actioncable to list of release frameworks [ci skip] 2015-12-17 16:08:02 +01:00
Rafael Mendonça França
1576f47c23 Ignore Gemfile.lock in the release task 2015-11-12 15:12:34 -02:00
Rafael Mendonça França
89b7396191 Add bundle check to release task 2015-11-05 01:04:07 -02:00
Rafael Mendonça França
d52baa8514 Add tasks to automatize CHANGELOG headers 2015-10-30 18:03:18 -02:00