From ba907d6caa92880bd3d7d5635823361f6fca829d Mon Sep 17 00:00:00 2001 From: eileencodes Date: Wed, 27 Apr 2016 15:31:47 -0500 Subject: 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. --- tasks/release.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/release.rb b/tasks/release.rb index de9c51a140..d55f2f7365 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -56,7 +56,7 @@ directory "pkg" task :build => [:clean, gem] task :install => :build do - sh "gem install #{gem}" + sh "gem install --pre #{gem}" end task :push => :build do -- cgit v1.2.3 From db93aa16c466c310d5e0f720eb966329e3bdcd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 6 May 2016 16:23:37 -0500 Subject: Sign the tags when releasing --- tasks/release.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks') diff --git a/tasks/release.rb b/tasks/release.rb index d55f2f7365..61b44a4c56 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -135,7 +135,7 @@ namespace :all do end task :tag do - sh "git tag -m '#{tag} release' #{tag}" + sh "git tag -s -m '#{tag} release' #{tag}" sh "git push --tags" end -- cgit v1.2.3 From 548c1d6e8b819ca4e02e6218b67107c580ee65f2 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 7 May 2016 10:41:23 -0400 Subject: Publish Action Cable to NPM when we release. Signed-off-by: Jeremy Daer --- tasks/release.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'tasks') diff --git a/tasks/release.rb b/tasks/release.rb index 61b44a4c56..e54b03eafa 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -44,6 +44,36 @@ directory "pkg" raise "Could not insert PRE in #{file}" unless $1 File.open(file, 'w') { |f| f.write ruby } + + if File.exist?("#{framework}/package.json") + Dir.chdir("#{framework}") do + # This "npm-ifies" the current version + # With npm, versions such as "5.0.0.rc1" or "5.0.0.beta1.1" are not compliant with its + # versioning system, so they must be transformed to "5.0.0-rc1" and "5.0.0-beta1-1" respectively. + + # In essence, the code below runs through all "."s that appear in the version, + # and checks to see if their index in the version string is greater than or equal to 2, + # and if so, it will change the "." to a "-". + + # Sample version transformations: + # irb(main):001:0> version = "5.0.1.1" + # => "5.0.1.1" + # irb(main):002:0> version.gsub(/\./).with_index { |s, i| i >= 2 ? '-' : s } + # => "5.0.1-1" + # irb(main):003:0> version = "5.0.0.rc1" + # => "5.0.0.rc1" + # irb(main):004:0> version.gsub(/\./).with_index { |s, i| i >= 2 ? '-' : s } + # => "5.0.0-rc1" + version = version.gsub(/\./).with_index { |s, i| i >= 2 ? '-' : s } + + # Check if npm is installed, and raise an error if not + if sh 'which npm' + sh "npm version #{version} --no-git-tag-version" + else + raise 'You must have npm installed to release Rails.' + end + end + end end task gem => %w(update_versions pkg) do @@ -61,6 +91,7 @@ directory "pkg" task :push => :build do sh "gem push #{gem}" + sh "npm publish" if File.exist?("#{framework}/package.json") end end end -- cgit v1.2.3 From d12209cad2d8961f396a6e7cbd0ee9437b9751ef Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Mon, 23 May 2016 17:05:44 -0400 Subject: Remove package:clean task MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced in d6f2000a67cc63aa67414c75ce77de671824ec52 and was only used by Action Cable. Now handled by Action Cable’s assets:compile task. --- tasks/release.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'tasks') diff --git a/tasks/release.rb b/tasks/release.rb index e54b03eafa..4a1ed04478 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -13,7 +13,6 @@ directory "pkg" task :clean do rm_f gem - sh "cd #{framework} && bundle exec rake package:clean" unless framework == "rails" end task :update_versions do -- cgit v1.2.3