From 8eab806da82d1ea48a3c0a23a8885e681a7d75e5 Mon Sep 17 00:00:00 2001 From: kyab Date: Thu, 4 Jul 2013 22:09:05 +0900 Subject: Add --pull_gems option to minirake --- tasks/mruby_build_commands.rake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tasks/mruby_build_commands.rake') diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index 1d69fa54d..b678b1f0e 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -220,19 +220,28 @@ module MRuby class Command::Git < Command attr_accessor :flags - attr_accessor :clone_options + attr_accessor :clone_options, :pull_options def initialize(build) super @command = 'git' @flags = [] @clone_options = "clone %{flags} %{url} %{dir}" + @pull_options = "pull" end def run_clone(dir, url, _flags = []) _pp "GIT", url, dir.relative_path _run clone_options, { :flags => [flags, _flags].flatten.join(' '), :url => url, :dir => filename(dir) } end + + def run_pull(dir, url) + root = Dir.pwd + Dir.chdir dir + _pp "GIT PULL", url, dir.relative_path + _run pull_options + Dir.chdir root + end end class Command::Mrbc < Command -- cgit v1.2.3 From 494880fa10b75ca07789099d1a96185572c42647 Mon Sep 17 00:00:00 2001 From: kyab Date: Wed, 24 Jul 2013 18:37:00 +0900 Subject: Fix mrbc error for space included path --- tasks/mruby_build_commands.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks/mruby_build_commands.rake') diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index b678b1f0e..e09aee426 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -259,7 +259,7 @@ module MRuby infiles.each do |f| _pp "MRBC", f.relative_path, nil, :indent => 2 end - IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{infiles.join(' ')}", 'r+') do |io| + IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{filename(infiles).join(' ')}", 'r+') do |io| out.puts io.read end end -- cgit v1.2.3 From f4ae43249793259b4b6d4c79ca8a091c65de30ef Mon Sep 17 00:00:00 2001 From: fleuria Date: Thu, 25 Jul 2013 03:47:39 +0800 Subject: if mrbc.run fail, abort rake --- tasks/mruby_build_commands.rake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tasks/mruby_build_commands.rake') diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index e09aee426..19d0b70a2 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -262,6 +262,11 @@ module MRuby IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}} #{filename(infiles).join(' ')}", 'r+') do |io| out.puts io.read end + # if mrbc execution fail, drop the file + if not $?.exitstatus + File.delete(out.path) + exit -1 + end end end -- cgit v1.2.3 From 961cd408a86580c4d428f56153da00fd46738e35 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 27 Jul 2013 14:21:09 +0900 Subject: replace "if not" to "unless" --- tasks/mrbgems_test.rake | 2 +- tasks/mruby_build_commands.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tasks/mruby_build_commands.rake') diff --git a/tasks/mrbgems_test.rake b/tasks/mrbgems_test.rake index 717f0d76b..1050b84bb 100644 --- a/tasks/mrbgems_test.rake +++ b/tasks/mrbgems_test.rake @@ -38,7 +38,7 @@ MRuby.each_target do f.puts %Q[ }] f.puts %Q[ mrb_const_set(mrb2, mrb_obj_value(mrb2->object_class), mrb_intern(mrb2, "GEMNAME"), mrb_str_new(mrb2, "#{g.name}", #{g.name.length}));] - if not g.test_args.empty? + unless g.test_args.empty? f.puts %Q[ test_args_hash = mrb_hash_new_capa(mrb, #{g.test_args.length}); ] g.test_args.each do |arg_name, arg_value| escaped_arg_name = arg_name.gsub('\\', '\\\\\\\\').gsub('"', '\"') diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index 19d0b70a2..349b8717d 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -263,7 +263,7 @@ module MRuby out.puts io.read end # if mrbc execution fail, drop the file - if not $?.exitstatus + unless $?.exitstatus File.delete(out.path) exit -1 end -- cgit v1.2.3