aboutsummaryrefslogtreecommitdiffstats
path: root/tasks/release.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix rubocop offensesbogdanvlviv2018-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | - 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##/ ```
* Enable Start/EndWith and RegexpMatch copsBart de Water2018-07-281-1/+1
| | | | | 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
* prefer File.write for bulk writesXavier Noria2018-05-051-2/+2
| | | | | | | | | | | | | | | | | | 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.
* Deprecate safe_level of `ERB.new` in Ruby 2.6Koichi ITO2018-03-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### 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] https://github.com/ruby/ruby/blob/2311087b685e8dc0f21f4a89875f25c22f5c39a9/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. https://github.com/ruby/ruby/commit/40db89c0934c23d7464d47946bb682b9035411f9
* Remove unused variable `gem_version` from `tasks/release.rb`bogdanvlviv2017-09-241-1/+0
|
* Use frozen string literal in tasks/Koichi ITO2017-08-131-4/+6
|
* Merge pull request #30020 from rails/active-storage-importDavid Heinemeier Hansson2017-08-041-1/+1
|\ | | | | Add Active Storage to Rails
| * Add Active Storage to README and release (#30065)Claudio B2017-08-041-1/+1
| | | | | | Before we forget...
* | Fix all rubocop violationsRafael Mendonça França2017-08-031-1/+1
|/
* Use exact Rails version when verifying.Kasper Timm Hansen2017-07-251-1/+6
|
* Support multiple versions in release announcement.Kasper Timm Hansen2017-07-221-51/+29
| | | | | So releasing 5.1 and 5.0 together won't require manual copy and paste.
* Add task to verify a release.Kasper Timm Hansen2017-07-221-1/+22
| | | | | | | | 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.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Define path with __dir__bogdanvlviv2017-05-231-1/+1
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Fix the blog post template headerRafael Mendonça França2017-03-201-1/+1
|
* Use shasum 256 on the releaseRafael Mendonça França2017-02-241-2/+2
|
* Rearrange npm release process againMatthew Draper2017-02-231-42/+41
| | | | Make prep_release idempotent, including the npm bump.
* Add a task to build a draft of the release announcementMatthew Draper2017-02-231-0/+69
|
* Do not override the global variableRafael Mendonça França2017-02-231-2/+2
| | | | This will make the version of the next gems to change
* modernizes hash syntax in the rest of the projectXavier Noria2016-08-061-9/+9
|
* applies new string literal convention in tasksXavier Noria2016-08-061-24/+24
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix release task now that NPM is part of the buildeileencodes2016-07-011-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove package:clean taskJavan Makhmali2016-05-241-1/+0
| | | | Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task.
* Publish Action Cable to NPM when we release.Jon Moss2016-05-111-0/+31
| | | | Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* Sign the tags when releasingRafael Mendonça França2016-05-061-1/+1
|
* Fix release script to allow pre release gemseileencodes2016-04-271-1/+1
| | | | | This addition of `--pre` fixes the issue we were seeing when installing a local copy of a pre-release rails version.
* Wrangle the asset build into something that sounds more generalMatthew Draper2016-02-011-1/+2
|
* Add Action Cable asset building as release stepJon Moss2016-01-301-0/+1
|
* fix version update task to deal with .beta1.1Aaron Patterson2016-01-251-1/+1
|
* Add task to test the release preparationRafael Mendonça França2015-12-181-2/+2
|
* Add actioncable to list of release frameworks [ci skip]Arun Agrawal2015-12-171-1/+1
|
* Ignore Gemfile.lock in the release taskRafael Mendonça França2015-11-121-1/+1
|
* Add bundle check to release taskRafael Mendonça França2015-11-051-1/+5
|
* Add tasks to automatize CHANGELOG headersRafael Mendonça França2015-10-301-2/+13
|
* Allow release when CHANGELOG is changedRafael Mendonça França2015-08-241-1/+1
|
* activejob needs to be built before actionmailerGodfrey Chan2014-12-191-1/+1
|
* Fix shell quote on the release taskRafael Mendonça França2014-11-191-1/+1
|
* Remove activejob integration testsAbdelkader Boudih2014-08-121-1/+1
|
* Fix release taskArthur Neves2014-03-311-2/+2
| | | | | Add a parentheses. related: b4c96490eeb1fbb944e116c7703dd528b37fc08a
* Fix the update_versions release taskRafael Mendonça França2014-03-251-22/+22
|
* Take in consideration guides CHANGELOGRafael Mendonça França2014-03-141-2/+2
|
* Match the whole stringRafael Mendonça França2014-03-141-1/+1
|
* Use annotated git tags for release taskJeremy Kemper2013-12-181-1/+1
|
* we should use annotated tags for releases.Yves Senn2013-12-181-1/+1
| | | | Annotated tags will provide us with Tagger and Time information.
* Fix dependency orderDavid Heinemeier Hansson2013-12-171-1/+1
|
* Added missing actionview in list for releaseArun Agrawal2013-07-131-1/+1
|
* Fix release task after ceb3b8717beb9818fbfbab429a8aa697591e184aSantiago Pastorino2013-04-011-2/+19
|
* Fix update_version_rb taskrobertomiranda2013-03-241-14/+2
|
* Remove Active Resource source files from the repositoryPrem Sichanugrist2012-03-131-1/+1
| | | | | | | | | | Dear Active Resource, It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository. I will miss you, @sikachu.