Added status code checks to abort Rake early.

This commit is contained in:
Tom Robinson committed 2009-07-29 18:57:18 -07:00
1 parent fbf559043e
commit 856373adec
6 files changed
+16 -5

No files matched your search

+1
View File
@@ -53,6 +53,7 @@ file_d $THEME_PRODUCT => ThemeFiles << $ENVIRONMENT_PRODUCT do
puts str
end
end
rake abort if ($? != 0)
end
task :build => [:build_subprojects, :AppKit, $ENVIRONMENT_PRODUCT, $THEME_PRODUCT, $ENVIRONMENT_THEME_PRODUCT]
+1 -3
View File
@@ -55,9 +55,7 @@ def platform_flags(*platforms)
end
def build_product(path, flags)
IO.popen("gcc #{flags} -E -x c -P -", "w+") do |preprocessor|
Files.select { |name| name.match(/\.js$/) }.each do |fileName|
preprocessor.puts IO.read(fileName)
end
@@ -67,8 +65,8 @@ def build_product(path, flags)
File.open(path, "w") do |file|
file.write(IO.read("header.txt") + preprocessor.read)
end
end
rake abort if ($? != 0)
end
task :build => [:Products, $ENVIRONMENT_PRODUCT, :build_subprojects]
+7
View File
@@ -86,7 +86,9 @@ file_d $STARTER_DOWNLOAD_APPLICATION => [$TOOLS_DOWNLOAD_ENV] do
rm_rf($STARTER_DOWNLOAD_APPLICATION)
mkdir_p($STARTER_DOWNLOAD)
system %{capp gen #{$STARTER_DOWNLOAD_APPLICATION} -t Application --noconfig }
rake abort if ($? != 0)
# No tools means no objective-j gem
rm(File.join($STARTER_DOWNLOAD_APPLICATION, 'Rakefile'))
@@ -103,7 +105,9 @@ task :install => [:tools_download] do
else
prefix = ''
end
system %{cd #{$TOOLS_DOWNLOAD} && sudo sh ./install-tools #{prefix} }
rake abort if ($? != 0)
end
task :test => [:build] do
@@ -122,6 +126,8 @@ end
task :docs do
if executable_exists? "doxygen"
system %{doxygen #{$DOXYGEN_CONFIG} }
rake abort if ($? != 0)
rm_rf $DOCUMENTATION_BUILD
mv "debug.txt", "Documentation"
mv "Documentation", $DOCUMENTATION_BUILD
@@ -133,6 +139,7 @@ end
task :submodules do
if executable_exists? "git"
system %{git submodule init && git submodule update}
rake abort if ($? != 0)
else
puts "Git not installed"
rake abort
+3
View File
@@ -390,6 +390,7 @@ module ObjectiveJ
puts str
end
end
rake abort if ($? != 0)
end
{ 'copy' => include_nibs, 'copied_resources' => [copied_resource] }
@@ -424,6 +425,7 @@ module ObjectiveJ
puts str
end
end
rake abort if ($? != 0)
end
enhance([frameworks_path])
@@ -510,6 +512,7 @@ module ObjectiveJ
puts str
end
end
rake abort if ($? != 0)
end
BundleTask.compact(build_path) if needs_compact
@@ -16,6 +16,7 @@ file_d $BLEND_PRODUCT => ['ThemeDescriptors.j'] do
puts str
end
end
rake abort if ($? != 0)
end
task :default => [$BLEND_PRODUCT]
+3 -2
View File
@@ -77,8 +77,8 @@ end
def subrake(directories, task_name)
directories.each do |directory|
if (File.directory?(directory) && File.file?(File.join(directory, "Rakefile")))
ok = system(%{cd #{directory} && #{$serialized_env} #{$0} #{task_name}})
rake abort unless ok
system(%{cd #{directory} && #{$serialized_env} #{$0} #{task_name}})
rake abort if ($? != 0)
else
puts "warning: subrake missing: " + directory +" (this is not necessarily an error, "+directory+" may be optional)"
end
@@ -147,4 +147,5 @@ task :clobberall => ['clobber-all']
def spawn_rake(task_name)
system %{#{$serialized_env} #{$0} #{task_name}}
rake abort if ($? != 0)
end